Examples of addIdentityToSecurityGroup()


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

    SecurityGroup group = securityManager.findSecurityGroupByName(Constants.GROUP_OLATUSERS);
    if (group == null) group = securityManager.createAndPersistNamedSecurityGroup(Constants.GROUP_OLATUSERS);
    User user = UserManager.getInstance().createUser("first" + login, "last" + login, login + "@" + maildomain);
    Identity identity = securityManager.createAndPersistIdentityAndUser(login, user, OLATAuthenticationController.PROVIDER_OLAT, login,
        Encoder.encrypt("A6B7C8"));
    securityManager.addIdentityToSecurityGroup(identity, group);
    return identity;
  }

  /**
   * Create an identity with author permissions
View Full Code Here

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

    SecurityGroup group = securityManager.findSecurityGroupByName(Constants.GROUP_AUTHORS);
    if (group == null) group = securityManager.createAndPersistNamedSecurityGroup(Constants.GROUP_AUTHORS);
    User user = UserManager.getInstance().createUser("first" + login, "last" + login, login + "@" + maildomain);
    Identity identity = securityManager.createAndPersistIdentityAndUser(login, user, OLATAuthenticationController.PROVIDER_OLAT, login,
        Encoder.encrypt("A6B7C8"));
    securityManager.addIdentityToSecurityGroup(identity, group);
    return identity;
  }
 
  /**
   * Create an identity with admin permissions
View Full Code Here

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

    SecurityGroup group = securityManager.findSecurityGroupByName(Constants.GROUP_ADMIN);
    if (group == null) group = securityManager.createAndPersistNamedSecurityGroup(Constants.GROUP_ADMIN);
    User user = UserManager.getInstance().createUser("first" + login, "last" + login, login + "@" + maildomain);
    Identity identity = securityManager.createAndPersistIdentityAndUser(login, user, OLATAuthenticationController.PROVIDER_OLAT, login,
        Encoder.encrypt("A6B7C8"));
    securityManager.addIdentityToSecurityGroup(identity, group);
    return identity;
  }
 
  /**
   * Remove identity from <code>Constants.GROUP_OLATUSERS</code> group.
View Full Code Here

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

            user.setProperty(UserConstants.INSTITUTIONALEMAIL, userMapping.getInstitutionalEMail());
          }
          user.setProperty(UserConstants.INSTITUTIONALUSERIDENTIFIER, userMapping.getInstitutionalUserIdentifier());
          identity = secMgr.createAndPersistIdentityAndUser(choosenLogin, user, ShibbolethDispatcher.PROVIDER_SHIB, shibbolethUniqueID, null);
          SecurityGroup olatUserGroup = secMgr.findSecurityGroupByName(Constants.GROUP_OLATUSERS);
          secMgr.addIdentityToSecurityGroup(identity, olatUserGroup);
          // tell system that this user did accept the disclaimer
          RegistrationManager.getInstance().setHasConfirmedDislaimer(identity);
          doLogin(identity, ureq);
          return;
        } else if (state == STATE_MIGRATED_SHIB_USER) { // ...proceed and migrate user
View Full Code Here

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

    //    securityManager.createAndPersistPolicy(ownerGroup, Constants.PERMISSION_ACCESS, businessgroup);
    securityManager.createAndPersistPolicyWithResource(ownerGroup, Constants.PERMISSION_ACCESS, businessgroupOlatResource);
    securityManager.createAndPersistPolicyWithResource(partipiciantGroup, Constants.PERMISSION_READ, businessgroupOlatResource);
    // membership: add identity
    securityManager.addIdentityToSecurityGroup(identity, ownerGroup);

    // per default all collaboration-tools are disabled

    // group members visibility
    BusinessGroupPropertyManager bgpm = new BusinessGroupPropertyManager(businessgroup);
View Full Code Here

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

    securityManager.createAndPersistPolicyWithResource(ownerGroup, Constants.PERMISSION_COACH, groupContextOlatResource);
    securityManager.createAndPersistPolicyWithResource(partipiciantGroup, Constants.PERMISSION_READ, businessgroupOlatResource);
    securityManager.createAndPersistPolicyWithResource(partipiciantGroup, Constants.PERMISSION_PARTI, groupContextOlatResource);
    // membership: add identity if available
    if (identity != null) {
      securityManager.addIdentityToSecurityGroup(identity, ownerGroup);
    }

    // per default all collaboration-tools are disabled

    // group members visibility
View Full Code Here

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

    OLATResource businessgroupOlatResource = OLATResourceManager.getInstance().createOLATResourceInstance(businessgroup);
    OLATResourceManager.getInstance().saveOLATResource(businessgroupOlatResource);
    securityManager.createAndPersistPolicyWithResource(partipiciantGroup, Constants.PERMISSION_READ, businessgroupOlatResource);
    // membership: add identity if available
    if (identity != null) {
      securityManager.addIdentityToSecurityGroup(identity, partipiciantGroup);
    }

    // per default all collaboration-tools are disabled

    // group members visibility
View Full Code Here

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

      BGContext c1 = cm.createAndAddBGContextToResource("c1name", course1, BusinessGroup.TYPE_LEARNINGROUP, id1, true);
      // create groups without waitinglist
      BusinessGroup g1 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g1", null, new Integer(0), new Integer(10), false, false, c1);
      BusinessGroup g2 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g2", null, new Integer(0), new Integer(10), false, false, c1);
      // members
      secm.addIdentityToSecurityGroup(id1, g2.getOwnerGroup());
      secm.addIdentityToSecurityGroup(id1, g1.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id2, g1.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id2, g2.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id3, g1.getOwnerGroup());
      // areas
View Full Code Here

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

      // create groups without waitinglist
      BusinessGroup g1 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g1", null, new Integer(0), new Integer(10), false, false, c1);
      BusinessGroup g2 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g2", null, new Integer(0), new Integer(10), false, false, c1);
      // members
      secm.addIdentityToSecurityGroup(id1, g2.getOwnerGroup());
      secm.addIdentityToSecurityGroup(id1, g1.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id2, g1.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id2, g2.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id3, g1.getOwnerGroup());
      // areas
      BGArea a1 = am.createAndPersistBGAreaIfNotExists("a1", "desca1",c1);
View Full Code Here

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

      BusinessGroup g1 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g1", null, new Integer(0), new Integer(10), false, false, c1);
      BusinessGroup g2 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g2", null, new Integer(0), new Integer(10), false, false, c1);
      // members
      secm.addIdentityToSecurityGroup(id1, g2.getOwnerGroup());
      secm.addIdentityToSecurityGroup(id1, g1.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id2, g1.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id2, g2.getPartipiciantGroup());
      secm.addIdentityToSecurityGroup(id3, g1.getOwnerGroup());
      // areas
      BGArea a1 = am.createAndPersistBGAreaIfNotExists("a1", "desca1",c1);
      BGArea a2 = am.createAndPersistBGAreaIfNotExists("a2", null, c1);
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.