@Test public void testListRolesForUser() throws OdpsException, IOException { List<User> list = sm.listUsers(); Assert.assertNotEquals(0, list.size()); User u = list.get(0); System.err.println("list roles for uid " + u.getID()); List<Role> r1 = sm.listRolesForUserID(u.getID()); for (Role role : r1) { System.err.println(role.getName()); } System.err.println("list roles for username " + u.getDisplayname()); List<Role> r2 = sm.listRolesForUserName(u.getDisplayname()); for (Role role : r2) { System.err.println(role.getName()); } Assert.assertEquals(r1.size(), r2.size()); for (int i = 0; i < r1.size(); i++) { Assert.assertEquals(r1.get(i).getName(), r2.get(i).getName()); } }
@Deprecated public List<Role> listRolesForUser(String uid) throws OdpsException { return listRolesForUserID(uid); }
SecurityManager { @Deprecated public List<Role> listRolesForUser(String uid) throws OdpsException { return listRolesForUserID(uid); } }
SecurityManager { @Deprecated public List<Role> listRolesForUser(String uid) throws OdpsException { return listRolesForUserID(uid); } SecurityManager(String project, RestClient client); }
SecurityManager { @Deprecated public List<Role> listRolesForUser(String uid) throws OdpsException { return listRolesForUserID(uid); } SecurityManager(String project, RestClient client); SecurityConfiguration getSecurityConfiguration(); SecurityConfiguration getSecurityConfiguration(boolean strip); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration
  ); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration, String supervisionToken
  ); String getProjectPolicy(); void putProjectPolicy(String policy); String getSecurityPolicy(); void putSecurityPolicy(String securityPolicy); String getRolePolicy(String roleName); void putRolePolicy(String roleName, String policy); List<User> listUsers(); List<Role> listRoles(); @Deprecated List<Role> listRolesForUser(String uid); List<Role> listRolesForUserID(String uid); List<Role> listRolesForUserName(String userName); List<User> listUsersForRole(String roleName); CheckPermissionResultInfo checkPermission(PermissionDesc desc); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName,
      List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName
  ); AuthorizationQueryInstance run(String query, Boolean jsonOutput); AuthorizationQueryInstance run(String query, Boolean jsonOutput, String supervisionToken); String runQuery(String query, Boolean jsonOutput); String runQuery(String query, Boolean jsonOutput, String supervisionToken); String generateAuthorizationToken(String policy, String type); }
SecurityManager { @Deprecated public List<Role> listRolesForUser(String uid) throws OdpsException { return listRolesForUserID(uid); } SecurityManager(String project, RestClient client); SecurityConfiguration getSecurityConfiguration(); SecurityConfiguration getSecurityConfiguration(boolean strip); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration
  ); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration, String supervisionToken
  ); String getProjectPolicy(); void putProjectPolicy(String policy); String getSecurityPolicy(); void putSecurityPolicy(String securityPolicy); String getRolePolicy(String roleName); void putRolePolicy(String roleName, String policy); List<User> listUsers(); List<Role> listRoles(); @Deprecated List<Role> listRolesForUser(String uid); List<Role> listRolesForUserID(String uid); List<Role> listRolesForUserName(String userName); List<User> listUsersForRole(String roleName); CheckPermissionResultInfo checkPermission(PermissionDesc desc); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName,
      List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName
  ); AuthorizationQueryInstance run(String query, Boolean jsonOutput); AuthorizationQueryInstance run(String query, Boolean jsonOutput, String supervisionToken); String runQuery(String query, Boolean jsonOutput); String runQuery(String query, Boolean jsonOutput, String supervisionToken); String generateAuthorizationToken(String policy, String type);  }