Skip to content
Snippets Groups Projects
Commit 71e3ddac authored by Danny Auble's avatar Danny Auble
Browse files

Allow users with PrivateData=Users to view themselves since it is already

allowed to see their associations.
parent 5a84e627
No related branches found
No related tags found
No related merge requests found
...@@ -1121,12 +1121,13 @@ extern List as_mysql_get_users(mysql_conn_t *mysql_conn, uid_t uid, ...@@ -1121,12 +1121,13 @@ extern List as_mysql_get_users(mysql_conn_t *mysql_conn, uid_t uid,
if (private_data & PRIVATE_DATA_USERS) { if (private_data & PRIVATE_DATA_USERS) {
if (!(is_admin = is_user_min_admin_level( if (!(is_admin = is_user_min_admin_level(
mysql_conn, uid, SLURMDB_ADMIN_OPERATOR))) { mysql_conn, uid, SLURMDB_ADMIN_OPERATOR))) {
if (!is_user_any_coord(mysql_conn, &user)) { assoc_mgr_fill_in_user(
error("Only admins/coordinators can " mysql_conn, &user, 1, NULL);
"access user data"); }
errno = ESLURM_ACCESS_DENIED; if (!is_admin && !user.name) {
return NULL; debug("User %u has no assocations, and is not admin, "
} "so not returning any users.", user.uid);
return NULL;
} }
} }
......
...@@ -797,12 +797,13 @@ extern List as_mysql_get_wckeys(mysql_conn_t *mysql_conn, uid_t uid, ...@@ -797,12 +797,13 @@ extern List as_mysql_get_wckeys(mysql_conn_t *mysql_conn, uid_t uid,
if (private_data & PRIVATE_DATA_USERS) { if (private_data & PRIVATE_DATA_USERS) {
if (!(is_admin = is_user_min_admin_level( if (!(is_admin = is_user_min_admin_level(
mysql_conn, uid, SLURMDB_ADMIN_OPERATOR))) { mysql_conn, uid, SLURMDB_ADMIN_OPERATOR))) {
if (!is_user_any_coord(mysql_conn, &user)) { assoc_mgr_fill_in_user(
error("Only admins/coordinators can " mysql_conn, &user, 1, NULL);
"access wc key data"); }
errno = ESLURM_ACCESS_DENIED; if (!is_admin && !user.name) {
return NULL; debug("User %u has no assocations, and is not admin, "
} "so not returning any wckeys.", user.uid);
return NULL;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment