Examples of findSecurityGroupByName()


Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      boolean isAuthor = form.isAuthor() || form.isInstitutionalResourceManager();
      updateSecurityGroup(myIdentity, secMgr, authorGroup, hasBeenAuthor, isAuthor);
    }
    // user manager, only allowed by admin
    if (iAmOlatAdmin) {
      SecurityGroup userManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_USERMANAGERS);
      boolean hasBeenUserManager = secMgr.isIdentityInSecurityGroup(myIdentity, userManagerGroup);
      boolean isUserManager = form.isUsermanager();
      updateSecurityGroup(myIdentity, secMgr, userManagerGroup, hasBeenUserManager, isUserManager);
    }
     // institutional resource manager, only allowed by admin
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      boolean isUserManager = form.isUsermanager();
      updateSecurityGroup(myIdentity, secMgr, userManagerGroup, hasBeenUserManager, isUserManager);
    }
     // institutional resource manager, only allowed by admin
    if (iAmUserManager || iAmOlatAdmin) {
      SecurityGroup institutionalResourceManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_INST_ORES_MANAGER);
      boolean hasBeenInstitutionalResourceManager = secMgr.isIdentityInSecurityGroup(myIdentity, institutionalResourceManagerGroup);
      boolean isInstitutionalResourceManager = form.isInstitutionalResourceManager();
      updateSecurityGroup(myIdentity, secMgr, institutionalResourceManagerGroup, hasBeenInstitutionalResourceManager, isInstitutionalResourceManager);
    }
    // system administrator, only allowed by admin
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      boolean isInstitutionalResourceManager = form.isInstitutionalResourceManager();
      updateSecurityGroup(myIdentity, secMgr, institutionalResourceManagerGroup, hasBeenInstitutionalResourceManager, isInstitutionalResourceManager);
    }
    // system administrator, only allowed by admin
    if (iAmOlatAdmin) {
      SecurityGroup adminGroup = secMgr.findSecurityGroupByName(Constants.GROUP_ADMIN);
      boolean hasBeenAdmin = secMgr.isIdentityInSecurityGroup(myIdentity, adminGroup);
      boolean isAdmin = form.isAdmin();
      updateSecurityGroup(myIdentity, secMgr, adminGroup, hasBeenAdmin, isAdmin);   
    }
    if (iAmOlatAdmin &&  !myIdentity.getStatus().equals(form.getStatus()) ) {
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

        int publishedCourses = repoMgr.countByTypeLimitAccess(CourseModule.ORES_TYPE_COURSE, RepositoryEntry.ACC_USERS);
        msgProperties.setProperty("courseCountAll", String.valueOf(allCourses));
        msgProperties.setProperty("courseCountPublished", String.valueOf(publishedCourses));
        // User counts
        Manager secMgr = ManagerFactory.getManager();
        SecurityGroup olatuserGroup = secMgr.findSecurityGroupByName(Constants.GROUP_OLATUSERS);
        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));
       
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      // check user rights:
      boolean iAmOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
      identity = ureq.getIdentity();
      Manager secMgr = ManagerFactory.getManager();
      // get user system roles groups from security manager
      SecurityGroup adminGroup = secMgr.findSecurityGroupByName(Constants.GROUP_ADMIN);
      boolean isAdmin = secMgr.isIdentityInSecurityGroup(identity, adminGroup);
      SecurityGroup userManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_USERMANAGERS);
      boolean isUserManager = secMgr.isIdentityInSecurityGroup(identity, userManagerGroup);
      SecurityGroup authorGroup = secMgr.findSecurityGroupByName(Constants.GROUP_AUTHORS);
      boolean isAuthor = secMgr.isIdentityInSecurityGroup(identity, authorGroup);
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      identity = ureq.getIdentity();
      Manager secMgr = ManagerFactory.getManager();
      // get user system roles groups from security manager
      SecurityGroup adminGroup = secMgr.findSecurityGroupByName(Constants.GROUP_ADMIN);
      boolean isAdmin = secMgr.isIdentityInSecurityGroup(identity, adminGroup);
      SecurityGroup userManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_USERMANAGERS);
      boolean isUserManager = secMgr.isIdentityInSecurityGroup(identity, userManagerGroup);
      SecurityGroup authorGroup = secMgr.findSecurityGroupByName(Constants.GROUP_AUTHORS);
      boolean isAuthor = secMgr.isIdentityInSecurityGroup(identity, authorGroup);
      SecurityGroup groupmanagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_GROUPMANAGERS);
      boolean isGroupManager = secMgr.isIdentityInSecurityGroup(identity, groupmanagerGroup);
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      // get user system roles groups from security manager
      SecurityGroup adminGroup = secMgr.findSecurityGroupByName(Constants.GROUP_ADMIN);
      boolean isAdmin = secMgr.isIdentityInSecurityGroup(identity, adminGroup);
      SecurityGroup userManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_USERMANAGERS);
      boolean isUserManager = secMgr.isIdentityInSecurityGroup(identity, userManagerGroup);
      SecurityGroup authorGroup = secMgr.findSecurityGroupByName(Constants.GROUP_AUTHORS);
      boolean isAuthor = secMgr.isIdentityInSecurityGroup(identity, authorGroup);
      SecurityGroup groupmanagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_GROUPMANAGERS);
      boolean isGroupManager = secMgr.isIdentityInSecurityGroup(identity, groupmanagerGroup);

      // usermanager:
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      boolean isAdmin = secMgr.isIdentityInSecurityGroup(identity, adminGroup);
      SecurityGroup userManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_USERMANAGERS);
      boolean isUserManager = secMgr.isIdentityInSecurityGroup(identity, userManagerGroup);
      SecurityGroup authorGroup = secMgr.findSecurityGroupByName(Constants.GROUP_AUTHORS);
      boolean isAuthor = secMgr.isIdentityInSecurityGroup(identity, authorGroup);
      SecurityGroup groupmanagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_GROUPMANAGERS);
      boolean isGroupManager = secMgr.isIdentityInSecurityGroup(identity, groupmanagerGroup);

      // usermanager:
      if (isAdmin || isUserManager || iAmOlatAdmin) {
        chkUserManager = uifactory.addCheckboxesVertical("Usermanager", "table.role.useradmin", innerFormLayout, new String[] { "Usermanager" }, new String[] { "" }, null, 1);
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

     * @param roleChangeMap
     * @return
     */
    private String getRoleStatusForIdentity(Identity identity, String securityGroup, HashMap<String, String> roleChangeMap) {
      Manager secMgr = ManagerFactory.getManager();
      SecurityGroup secGroup = secMgr.findSecurityGroupByName(securityGroup);
      Boolean isInGroup = secMgr.isIdentityInSecurityGroup(identity, secGroup);

      String thisRoleAction = "";
      if (roleChangeMap.containsKey(securityGroup)) {
        thisRoleAction = roleChangeMap.get(securityGroup);
View Full Code Here

Examples of org.olat.basesecurity.Manager.findSecurityGroupByName()

      } // for (propertyHandlers)

      // set roles for identity
      // loop over securityGroups defined above
      for (String securityGroup : securityGroups) {
        SecurityGroup secGroup = secMgr.findSecurityGroupByName(securityGroup);
        Boolean isInGroup = secMgr.isIdentityInSecurityGroup(identity, secGroup);
        String thisRoleAction = "";
        if (roleChangeMap.containsKey(securityGroup)) {
          thisRoleAction = roleChangeMap.get(securityGroup);
          // user not anymore in security group, remove him
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.