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

Unified Diff: appengine/swarming/server/acl.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 | « appengine/swarming/handlers_frontend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/server/acl.py
diff --git a/appengine/swarming/server/acl.py b/appengine/swarming/server/acl.py
index 1504c605e638dba07ef1fd0c203921da202a9aca..35bff6030be23f6016baf02c761e0ef8b6493a61 100644
--- a/appengine/swarming/server/acl.py
+++ b/appengine/swarming/server/acl.py
@@ -70,6 +70,11 @@ def is_bot_or_admin():
return is_bot() or is_admin()
+def can_schedule_high_priority_tasks():
+ """Returns True if the current user can schedule high priority tasks."""
+ return is_bot() or is_privileged_user()
+
+
def get_user_type():
"""Returns a string describing the current access control for the user."""
if is_admin():
« no previous file with comments | « appengine/swarming/handlers_frontend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698