Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
71e3ddac
Commit
71e3ddac
authored
11 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/accounting_storage/mysql/as_mysql_user.c
+7
-6
7 additions, 6 deletions
src/plugins/accounting_storage/mysql/as_mysql_user.c
src/plugins/accounting_storage/mysql/as_mysql_wckey.c
+7
-6
7 additions, 6 deletions
src/plugins/accounting_storage/mysql/as_mysql_wckey.c
with
14 additions
and
12 deletions
src/plugins/accounting_storage/mysql/as_mysql_user.c
+
7
−
6
View file @
71e3ddac
...
@@ -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
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/plugins/accounting_storage/mysql/as_mysql_wckey.c
+
7
−
6
View file @
71e3ddac
...
@@ -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
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment