Package org.olat.basesecurity

Examples of org.olat.basesecurity.PermissionOnResourceable


        int users = secMgr.countIdentitiesOfSecurityGroup(olatuserGroup);
        int disabled = secMgr.getIdentitiesByPowerSearch(null, null, true, null, null, null, null, null, Identity.STATUS_LOGIN_DENIED)
            .size();
        msgProperties.setProperty("usersEnabled", String.valueOf(users - disabled));
       
        PermissionOnResourceable[] permissions = { new PermissionOnResourceable(Constants.PERMISSION_HASROLE, Constants.ORESOURCE_AUTHOR) };
        List<Identity> authorsList = secMgr.getIdentitiesByPowerSearch(null, null, true, null, permissions, null, null, null, null);
        int authors = authorsList.size();
        msgProperties.setProperty("usersAuthors", String.valueOf(authors));
        // Activity
        Calendar lastLoginLimit = Calendar.getInstance();
View Full Code Here


      return contentCtr.getInitialComponent();
    }
    else if (uobject.equals("coauthors")) {
      activatePaneInDetailView = "edit.uroles";
      // special case: use user search controller and search for all users that have author rights
      PermissionOnResourceable[] permissions = {new PermissionOnResourceable(Constants.PERMISSION_HASROLE, Constants.ORESOURCE_AUTHOR)};
      UsermanagerUserSearchController myCtr = new UsermanagerUserSearchController(ureq, getWindowControl(),null, permissions, null, null, null, Identity.STATUS_VISIBLE_LIMIT, true);
      // now subtract users that are in the author group to get the co-authors
      Manager secMgr = ManagerFactory.getManager();
      SecurityGroup[] secGroup = {ManagerFactory.getManager().findSecurityGroupByName(Constants.GROUP_AUTHORS)};
      List identitiesFromAuthorGroup = secMgr.getVisibleIdentitiesByPowerSearch(null, null, true, secGroup , null, null, null, null);
      myCtr.removeIdentitiesFromSearchResult(ureq, identitiesFromAuthorGroup);
      contentCtr = myCtr;
      listenTo(contentCtr);
      return contentCtr.getInitialComponent();
    }
    else if (uobject.equals("resourceowners")) {
      activatePaneInDetailView = "edit.uroles";
      PermissionOnResourceable[] permissions = {new PermissionOnResourceable(Constants.PERMISSION_HASROLE, Constants.ORESOURCE_AUTHOR)};
      contentCtr = new UsermanagerUserSearchController(ureq, getWindowControl(),null, permissions, null, null, null, Identity.STATUS_VISIBLE_LIMIT, true);
      listenTo(contentCtr);
      return contentCtr.getInitialComponent();
    }
    else if (uobject.equals("groupmanagergroup")) {
View Full Code Here

  public List<Identity> getNewIdentityCreated(Date from) {
    if(from == null)
      return Collections.emptyList();
   
    Manager manager = ManagerFactory.getManager();
    PermissionOnResourceable[] permissions = {new PermissionOnResourceable(Constants.PERMISSION_HASROLE, Constants.ORESOURCE_GUESTONLY)};
    List<Identity> guests = manager.getIdentitiesByPowerSearch(null, null, true, null, permissions, null, from, null, Identity.STATUS_VISIBLE_LIMIT);
    List<Identity> identities = manager.getIdentitiesByPowerSearch(null, null, true, null, null, null, from, null, Identity.STATUS_VISIBLE_LIMIT);
    if(!identities.isEmpty() && !guests.isEmpty()) {
      identities.removeAll(guests);
    }
View Full Code Here

TOP

Related Classes of org.olat.basesecurity.PermissionOnResourceable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.