Examples of addRoleToUser()


Examples of com.dbxml.db.common.security.AccessManagerClient.addRoleToUser()

      }
      else if ( action.equals(ACTION_ADDROLE) ) {
         if ( !cl.hasMoreTokens() )
            throw new dbXMLException("A Role ID must be specified");
         String roleID = cl.getNextToken();
         manager.addRoleToUser(userID, roleID);
         pw.println("Role '"+roleID+"' added to User '"+userID+"'");
      }
      else if ( action.equals(ACTION_RMROLE) ) {
         if ( !cl.hasMoreTokens() )
            throw new dbXMLException("A Role ID must be specified");
View Full Code Here

Examples of com.dbxml.db.common.security.AccessManagerClient.addRoleToUser()

      String roleID = cl.getNextToken("Role ID");
      String action = cl.getNextToken("Role Action").toUpperCase();

      if ( action.equals(ACTION_ADDUSER) ) {
         String userID = cl.getNextToken("User ID");
         manager.addRoleToUser(userID, roleID);
         pw.println("User '"+userID+"' added to Role '"+roleID+"'");
      }
      else if ( action.equals(ACTION_RMUSER) ) {
         String userID = cl.getNextToken("User ID");
         manager.removeRoleFromUser(userID, roleID);
View Full Code Here

Examples of com.dotmarketing.business.RoleAPI.addRoleToUser()

    ActivityLogger.logInfo(getClass(), "Adding Role: " +role.getName() + " to User: " + user.getUserId() , "Date: " + date + "; "+ "User:" + modUser.getUserId());
    AdminLogger.log(getClass(), "Adding Role: " +role.getName() + " to User: " + user.getUserId() , "Date: " + date + "; "+ "User:" + modUser.getUserId());

    String error = "";
    try{
      roleAPI.addRoleToUser(role, user);
    }catch(DotStateException dse){
      error = LanguageUtil.format(request.getLocale(), "can_not_grant_users_check_rights", new String[]{role.getName()},false);
      ActivityLogger.logInfo(getClass(), "Error Adding Role: " +role.getName() + " to User: " + user.getUserId() , "Date: " + date + "; "+ "User:" + modUser.getUserId());
      AdminLogger.log(getClass(), "Error Adding Role: " +role.getName() + " to User: " + user.getUserId() , "Date: " + date + "; "+ "User:" + modUser.getUserId());
    }
View Full Code Here

Examples of com.dotmarketing.business.RoleAPI.addRoleToUser()

    //Adding missing roles
    for(String roleId : roleIds) {
      com.dotmarketing.business.Role r = roleAPI.loadRoleById(roleId);
      if(r.isEditUsers()) {
        try {
          roleAPI.addRoleToUser(r, user);
        } catch(DotDataException e) {
          ActivityLogger.logInfo(getClass(), "Error Adding User Role", "User Beign Modified:" + userId + "; "+ "Modificator User:" + currentUser.getUserId() + "; RoleID: " + r.getId() + "; Date:" + date );
          AdminLogger.log(getClass(), "Error Adding User Role", "User Beign Modified:" + userId + "; "+ "Modificator User:" + currentUser.getUserId() + "; RoleID: " + r.getId() + "; Date:" + date );
          throw e;
        } catch(DotStateException e) {
View Full Code Here

Examples of org.apache.jetspeed.security.RoleManager.addRoleToUser()

                        getManager().addPrincipal(principal, null);
                        User user = userManager.getUser(getUserName());

                        if(!StringUtils.isEmpty(defaultRole))
                        {
                            roleManager.addRoleToUser(getUserName(), defaultRole);
                        }
                        if(!StringUtils.isEmpty(requiredRole))
                        {
                            roleManager.addRoleToUser(getUserName(), requiredRole);
                        }
View Full Code Here

Examples of org.apache.jetspeed.security.RoleManager.addRoleToUser()

                        {
                            roleManager.addRoleToUser(getUserName(), defaultRole);
                        }
                        if(!StringUtils.isEmpty(requiredRole))
                        {
                            roleManager.addRoleToUser(getUserName(), requiredRole);
                        }
                       
                        Profiler profiler = getServiceLocator().getProfiler();
                       
                        if (!StringUtils.isEmpty(getProfilingRule()))
View Full Code Here

Examples of org.apache.jetspeed.security.RoleManager.addRoleToUser()

          if ((listTemp != null) && (listTemp.size()>0))
          {
            Iterator _itTemp = listTemp.iterator();
            while (_itTemp.hasNext())
            {
              roleManager.addRoleToUser(jsuser.getName(), (String)_itTemp.next());
            }
          }
            JSUserAttributes attributes = jsuser.getUserInfo();
          if (attributes != null)
          {
View Full Code Here

Examples of org.apache.jetspeed.security.RoleManager.addRoleToUser()

          if ((listTemp != null) && (listTemp.size()>0))
          {
            Iterator _itTemp = listTemp.iterator();
            while (_itTemp.hasNext())
            {
              roleManager.addRoleToUser(jsuser.getName(), (String)_itTemp.next());
            }
          }
            JSUserAttributes attributes = jsuser.getUserInfo();
          if (attributes != null)
          {
View Full Code Here

Examples of org.apache.jetspeed.security.RoleManager.addRoleToUser()

          if ((listTemp != null) && (listTemp.size()>0))
          {
            Iterator _itTemp = listTemp.iterator();
            while (_itTemp.hasNext())
            {
              roleManager.addRoleToUser(jsuser.getName(), (String)_itTemp.next());
            }
          }
            JSUserAttributes attributes = jsuser.getUserInfo();
          if (attributes != null)
          {
View Full Code Here

Examples of org.apache.jetspeed.security.RoleManager.addRoleToUser()

          if ((listTemp != null) && (listTemp.size()>0))
          {
            Iterator _itTemp = listTemp.iterator();
            while (_itTemp.hasNext())
            {
              roleManager.addRoleToUser(jsuser.getName(), (String)_itTemp.next());
            }
          }
            JSUserAttributes attributes = jsuser.getUserInfo();
          if (attributes != null)
          {
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.