Examples of listRoles()


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

         int permissions = 0;

         AccessManagerClient manager = new AccessManagerClient(col.getClient());
         if ( roleID == null ) {
            Set set = new TreeSet();
            String[] roles = manager.listRoles();
            for ( int i = 0; i < roles.length; i++ )
               set.add(roles[i]);

            Map acl = manager.listAccessControl(col.getCanonicalName());
            Iterator iter = acl.keySet().iterator();
View Full Code Here

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

      return "Role";
   }

   protected String[] getList(CollectionClient col) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      return manager.listRoles();
   }
}
View Full Code Here

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

   public AdminNode[] getChildren() {
      try {
         AccessManagerClient manager = new AccessManagerClient(col.getClient());
         switch ( type ) {
            case RoleNode.DATABASE: {
               String[] roles = manager.listRoles();
               AdminNode[] list = new AdminNode[roles.length];
               for ( int i = 0; i < roles.length; i++ )
                  list[i] = new RoleNode(this, col, roles[i], type);
               return list;
            }
View Full Code Here

Examples of com.dbxml.db.core.security.Access.listRoles()

      try {
         Element rolesElem = doc.createElement(ROLES);
         rootElem.appendChild(rolesElem);
         AccessUtils utils = new AccessUtils(col.getDatabase());
         Access access = utils.readAccess(col.getCanonicalName());
         String[] roles = access.listRoles();
         for ( int i = 0; i < roles.length; i++ ) {
            Element roleElem = doc.createElement(ROLE);
            roleElem.appendChild(doc.createTextNode(roles[i]));
            rolesElem.appendChild(roleElem);
View Full Code Here

Examples of org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient.listRoles()

    ProviderBackendContext context = new ProviderBackendContext();
    context.setAllowPerDatabase(true);
    policyFileBackend.initialize(context);
    client = new SentryPolicyServiceClient(getAuthzConf());
    Set<String> roles = new HashSet<String>();
    for (TSentryRole sentryRole : client.listRoles(requestorUserName)) {
      roles.add(sentryRole.getRoleName());
    }

    Table<String, String, Set<String>> groupRolePrivilegeTable =
        policyFileBackend.getGroupRolePrivilegeTable();
View Full Code Here

Examples of org.sonatype.security.authorization.AuthorizationManager.listRoles()

    if (ALL_ROLES_KEY.equalsIgnoreCase(sourceId)) {
      return this.listRoles();
    }
    else {
      AuthorizationManager authzManager = this.getAuthorizationManager(sourceId);
      return authzManager.listRoles();
    }
  }

  public Set<Privilege> listPrivileges() {
    Set<Privilege> privileges = new HashSet<Privilege>();
View Full Code Here

Examples of org.sonatype.security.authorization.AuthorizationManager.listRoles()

      throws Exception
  {
    AuthorizationManager authzManager = this.lookup(AuthorizationManager.class);

    Set<String> roles = new HashSet<String>();
    for (Role role : authzManager.listRoles()) {
      roles.add(role.getRoleId());
    }

    return roles;
  }
View Full Code Here

Examples of org.sonatype.security.authorization.AuthorizationManager.listRoles()

  public void testListRoles()
      throws Exception
  {
    AuthorizationManager authzManager = this.getAuthorizationManager();
    Set<Role> roles = authzManager.listRoles();

    Map<String, Role> roleMap = this.toRoleMap(roles);
    Assert.assertTrue(roleMap.containsKey("role1"));
    Assert.assertTrue(roleMap.containsKey("role2"));
    Assert.assertTrue(roleMap.containsKey("role3"));
View Full Code Here

Examples of org.sonatype.security.authorization.AuthorizationManager.listRoles()

  public void testListRoleIds()
      throws Exception
  {
    AuthorizationManager roleLocator = lookup(AuthorizationManager.class, "Simple");

    Set<String> roleIds = this.toIdSet(roleLocator.listRoles());
    Assert.assertTrue(roleIds.contains("role-xyz"));
    Assert.assertTrue(roleIds.contains("role-abc"));
    Assert.assertTrue(roleIds.contains("role-123"));
  }
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.