Package org.sonatype.security.rest.model

Examples of org.sonatype.security.rest.model.UserResource.removeRole()


      throws IOException
  {
    TestContainer.getInstance().getTestContext().useAdminForRequests();

    UserResource testUser = this.userUtil.getUser(userId);
    testUser.removeRole(privilege + "-role");
    this.userUtil.updateUser(testUser);
  }

  protected void addPriv(String userName, String privId, String type, String repoTargetId, String repositoryId,
                         String repositoryGroupId, String... methods)
View Full Code Here


            updateUser(user);
          }
        }
        else {
          if (user.getRoles().contains(ADMIN_ROLE)) {
            user.removeRole(ADMIN_ROLE);
            updateUser(user);
          }
        }

        return 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.