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

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

Issue 2985753003: swarming: Remove support for task without 'pool' dimension (Closed)
Patch Set: Tweak 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
« no previous file with comments | « appengine/swarming/server/task_request_test.py ('k') | appengine/swarming/server/task_scheduler_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9d2e0b169da6a5d3d0d91c07f4cdbe62e901b9f2 100644
--- a/appengine/swarming/server/task_scheduler.py
+++ b/appengine/swarming/server/task_scheduler.py
@@ -396,18 +396,8 @@ def _check_dimension_acls(request):
ident = request.authenticated
dims = request.properties.dimensions
- assert 'id' in dims or 'pool' in dims, dims # see _validate_dimensions
assert ident is not None # see task_request.init_new_request
- # Forbid targeting individual bots for non-admins, but allow using 'id' if
- # '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():
- raise auth.AuthorizationError(
- 'Only Swarming administrators can post tasks with "id" dimension '
- 'without specifying a "pool" dimension.')
-
for k, v in sorted(dims.iteritems()):
if not _can_use_dimension(dim_acls, ident, k, v):
raise auth.AuthorizationError(
« no previous file with comments | « appengine/swarming/server/task_request_test.py ('k') | appengine/swarming/server/task_scheduler_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698