Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: appengine/swarming/server/task_scheduler.py

Issue 2984843002: swarming: switch to a 'capability focused' ACL system (Closed)
Patch Set: Address comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/server/task_scheduler.py
diff --git a/appengine/swarming/server/task_scheduler.py b/appengine/swarming/server/task_scheduler.py
index 5da8fdcbc0a4a327fbb138bbed44f93d0662320a..d9fbf5fdf493f07de0b32f063c358c3972aa6736 100644
--- a/appengine/swarming/server/task_scheduler.py
+++ b/appengine/swarming/server/task_scheduler.py
@@ -403,7 +403,8 @@ def _check_dimension_acls(request):
# 'pool' is used as well (so whoever can posts tasks to 'pool', can target an
# individual bot in that pool).
if 'id' in dims and 'pool' not in dims:
- if not acl.is_admin():
+ # Only super-users can create a task without 'id' nor 'pool'.
+ if not acl.can_edit_config():
M-A Ruel 2017/07/24 15:42:51 This one is a bit awkward, not sure how to change.
Vadim Sh. 2017/07/24 19:16:47 Let's remove this clause. I think we have never us
M-A Ruel 2017/07/25 13:46:38 All removed.
raise auth.AuthorizationError(
'Only Swarming administrators can post tasks with "id" dimension '
'without specifying a "pool" dimension.')
« appengine/swarming/server/acl.py ('K') | « appengine/swarming/server/task_request.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698