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

Unified Diff: appengine/swarming/handlers_endpoints.py

Issue 2463483002: swarming: allow privileged users to schedule high priority tasks (Closed)
Patch Set: allow privileged users to schedule high priority tasks Created 4 years, 1 month 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 | « no previous file | appengine/swarming/handlers_frontend.py » ('j') | appengine/swarming/server/acl.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/handlers_endpoints.py
diff --git a/appengine/swarming/handlers_endpoints.py b/appengine/swarming/handlers_endpoints.py
index 7f56db7c1d87afd541538addad65b7fe7a1ebc43..fe7c6d8fdb123d0d8269e674bab0e13247da3943 100644
--- a/appengine/swarming/handlers_endpoints.py
+++ b/appengine/swarming/handlers_endpoints.py
@@ -344,7 +344,7 @@ class SwarmingTasksService(remote.Service):
request, utils.utcnow())
apply_property_defaults(request.properties)
task_request.init_new_request(
- request, acl.is_bot_or_admin(), secret_bytes)
+ request, acl.can_schedule_high_priority_tasks(), secret_bytes)
except (datastore_errors.BadValueError, TypeError, ValueError) as e:
raise endpoints.BadRequestException(e.message)
@@ -602,7 +602,7 @@ class SwarmingBotService(remote.Service):
try:
# Craft a special priority 0 task to tell the bot to shutdown.
request = task_request.create_termination_task(
- bot_id, acl.is_bot_or_admin())
+ bot_id, acl.can_schedule_high_priority_tasks())
except (datastore_errors.BadValueError, TypeError, ValueError) as e:
raise endpoints.BadRequestException(e.message)
« no previous file with comments | « no previous file | appengine/swarming/handlers_frontend.py » ('j') | appengine/swarming/server/acl.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698