Examples of findSecurityGroupByName()


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

   * @param login
   * @return
   */
  public static final Identity createAndPersistIdentityAsUser(String login) {
    Manager securityManager = ManagerFactory.getManager();
    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);
View Full Code Here

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

   * @param login
   * @return
   */
  public static final Identity createAndPersistIdentityAsAuthor(String login) {
    Manager securityManager = ManagerFactory.getManager();
    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);
View Full Code Here

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

   * @param login
   * @return
   */
  public static final Identity createAndPersistIdentityAsAdmin(String login) {
    Manager securityManager = ManagerFactory.getManager();
    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);
View Full Code Here

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

          if(hasEmailInShibAttr){
            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;
View Full Code Here

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

    if (userPropertiesSearch.isEmpty()) userPropertiesSearch = null;

    // get group memberships from form
    List<SecurityGroup> groupsList = new ArrayList<SecurityGroup>();
    if (searchform.getCheckBoxElement("admin") != null && searchform.getCheckBoxElement("admin").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_ADMIN);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("author") != null && searchform.getCheckBoxElement("author").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_AUTHORS);
      groupsList.add(group);
View Full Code Here

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

    if (searchform.getCheckBoxElement("admin") != null && searchform.getCheckBoxElement("admin").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_ADMIN);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("author") != null && searchform.getCheckBoxElement("author").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_AUTHORS);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("groupmanager") != null && searchform.getCheckBoxElement("groupmanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_GROUPMANAGERS);
      groupsList.add(group);
View Full Code Here

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

    if (searchform.getCheckBoxElement("author") != null && searchform.getCheckBoxElement("author").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_AUTHORS);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("groupmanager") != null && searchform.getCheckBoxElement("groupmanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_GROUPMANAGERS);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("usermanager") != null && searchform.getCheckBoxElement("usermanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_USERMANAGERS);
      groupsList.add(group);
View Full Code Here

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

    if (searchform.getCheckBoxElement("groupmanager") != null && searchform.getCheckBoxElement("groupmanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_GROUPMANAGERS);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("usermanager") != null && searchform.getCheckBoxElement("usermanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_USERMANAGERS);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("oresmanager") != null && searchform.getCheckBoxElement("oresmanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_INST_ORES_MANAGER);
      groupsList.add(group);
View Full Code Here

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

    if (searchform.getCheckBoxElement("usermanager") != null && searchform.getCheckBoxElement("usermanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_USERMANAGERS);
      groupsList.add(group);
    }
    if (searchform.getCheckBoxElement("oresmanager") != null && searchform.getCheckBoxElement("oresmanager").isChecked()) {
      SecurityGroup group = secMgr.findSecurityGroupByName(org.olat.basesecurity.Constants.GROUP_INST_ORES_MANAGER);
      groupsList.add(group);
    }
    if (searchform.getSingleSelectionElement("status") != null) {
      status = new Integer(searchform.getSingleSelectionElement("status").getSelectedKey());
    }
View Full Code Here

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

    Map configuration = BaseSecurityModule.getConfiguration();
    boolean iAmOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
   
    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);
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.