SecurityManager { public String runQuery(String query, Boolean jsonOutput) throws OdpsException { return runQuery(query, jsonOutput, null); } 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);  }
@Test(expected = OdpsException.class) public void testNoPermission() throws Exception { String query = sm.runQuery("add user aliyun$NOT_EXIST@aliyun.com", false); }