Package org.olat.basesecurity

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


    BusinessGroup g3 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_RIGHTGROUP, null, "g3", null, null, null, false, false, c2);

    Manager secm = ManagerFactory.getManager();
    secm.addIdentityToSecurityGroup(id1, g1.getPartipiciantGroup());
    secm.addIdentityToSecurityGroup(id2, g1.getPartipiciantGroup());
    secm.addIdentityToSecurityGroup(id1, g2.getPartipiciantGroup());
    secm.addIdentityToSecurityGroup(id3, g3.getPartipiciantGroup());

    BGRightManager rm = BGRightManagerImpl.getInstance();
    rm.addBGRight(CourseRights.RIGHT_ARCHIVING, g1);
    rm.addBGRight(CourseRights.RIGHT_COURSEEDITOR, g1);
View Full Code Here


    Manager secm = ManagerFactory.getManager();
    secm.addIdentityToSecurityGroup(id1, g1.getPartipiciantGroup());
    secm.addIdentityToSecurityGroup(id2, g1.getPartipiciantGroup());
    secm.addIdentityToSecurityGroup(id1, g2.getPartipiciantGroup());
    secm.addIdentityToSecurityGroup(id3, g3.getPartipiciantGroup());

    BGRightManager rm = BGRightManagerImpl.getInstance();
    rm.addBGRight(CourseRights.RIGHT_ARCHIVING, g1);
    rm.addBGRight(CourseRights.RIGHT_COURSEEDITOR, g1);
    rm.addBGRight(CourseRights.RIGHT_ARCHIVING, g2);
View Full Code Here

      // member of this group may modify member's membership
      securityManager.createAndPersistPolicy(ownerGroup, Constants.PERMISSION_ACCESS, ownerGroup);
      // members of this group are always authors also
      securityManager.createAndPersistPolicy(ownerGroup, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_AUTHOR);
      if ((i % 2 > 0)) {
        securityManager.addIdentityToSecurityGroup(id1, ownerGroup);
      } else {
        securityManager.addIdentityToSecurityGroup(id2, ownerGroup);       
      }
      re.setOwnerGroup(ownerGroup);
      // save the repository entry
View Full Code Here

      // members of this group are always authors also
      securityManager.createAndPersistPolicy(ownerGroup, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_AUTHOR);
      if ((i % 2 > 0)) {
        securityManager.addIdentityToSecurityGroup(id1, ownerGroup);
      } else {
        securityManager.addIdentityToSecurityGroup(id2, ownerGroup);       
      }
      re.setOwnerGroup(ownerGroup);
      // save the repository entry
      rm.saveRepositoryEntry(re);
      // Create course admin policy for owner group of repository entry
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.