Package org.sonatype.security.usermanagement

Examples of org.sonatype.security.usermanagement.RoleMappingUserManager


      // skip the user manager that owns the user, we already did that
      // these user managers will only save roles
      if (!tmpUserManager.getSource().equals(user.getSource())
          && RoleMappingUserManager.class.isInstance(tmpUserManager)) {
        try {
          RoleMappingUserManager roleMappingUserManager = (RoleMappingUserManager) tmpUserManager;
          roleMappingUserManager.setUsersRoles(user.getUserId(), user.getSource(),
              RoleIdentifier.getRoleIdentifiersForSource(user.getSource(),
                  user.getRoles()));
        }
        catch (UserNotFoundException e) {
          this.logger.debug("User '" + user.getUserId() + "' is not managed by the usermanager: "
View Full Code Here


      // skip the user manager that owns the user, we already did that
      // these user managers will only save roles
      if (!tmpUserManager.getSource().equals(user.getSource())
          && RoleMappingUserManager.class.isInstance(tmpUserManager)) {
        try {
          RoleMappingUserManager roleMappingUserManager = (RoleMappingUserManager) tmpUserManager;
          roleMappingUserManager.setUsersRoles(user.getUserId(), user.getSource(),
              RoleIdentifier.getRoleIdentifiersForSource(user.getSource(),
                  user.getRoles()));
        }
        catch (UserNotFoundException e) {
          this.logger.debug("User '" + user.getUserId() + "' is not managed by the usermanager: "
View Full Code Here

    boolean foundUser = false;

    for (UserManager tmpUserManager : userManagerFacade.getUserManagers().values()) {
      if (RoleMappingUserManager.class.isInstance(tmpUserManager)) {
        RoleMappingUserManager roleMappingUserManager = (RoleMappingUserManager) tmpUserManager;
        try {
          foundUser = true;
          roleMappingUserManager.setUsersRoles(userId,
              source,
              RoleIdentifier.getRoleIdentifiersForSource(tmpUserManager.getSource(),
                  roleIdentifiers));
        }
        catch (UserNotFoundException e) {
View Full Code Here

      // skip the user manager that owns the user, we already did that
      // these user managers will only have roles
      if (!tmpUserManager.getSource().equals(user.getSource())
          && RoleMappingUserManager.class.isInstance(tmpUserManager)) {
        try {
          RoleMappingUserManager roleMappingUserManager = (RoleMappingUserManager) tmpUserManager;
          Set<RoleIdentifier> roleIdentifiers =
              roleMappingUserManager.getUsersRoles(user.getUserId(), user.getSource());
          if (roleIdentifiers != null) {
            user.addAllRoles(roleIdentifiers);
          }
        }
        catch (UserNotFoundException e) {
View Full Code Here

TOP

Related Classes of org.sonatype.security.usermanagement.RoleMappingUserManager

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.