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

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

Issue 2984843002: swarming: switch to a 'capability focused' ACL system (Closed)
Patch Set: 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_request.py
diff --git a/appengine/swarming/server/task_request.py b/appengine/swarming/server/task_request.py
index 063fc2645531e0582db07c00d31f2dcc2e577fdb..e82d6d4475b2d74325f517a7c5996c6b8217af3b 100644
--- a/appengine/swarming/server/task_request.py
+++ b/appengine/swarming/server/task_request.py
@@ -713,20 +713,6 @@ class TaskRequest(ndb.Model):
"""Reconstructs this value from expiration_ts and created_ts. Integer."""
return int((self.expiration_ts - self.created_ts).total_seconds())
- @property
- def has_access(self):
- """Returns True if the current user has read-write access to this request.
-
- This is used for:
- * Read access: ability to read the task info and logs.
- * Write access: ability to cancel the task.
-
- Warning: This function looks at the current Authentication context.
- """
- return (
- acl.is_privileged_user() or
- self.authenticated == auth.get_current_identity())
-
def to_dict(self):
"""Converts properties_hash to hex so it is json serializable."""
# to_dict() doesn't recurse correctly into ndb.LocalStructuredProperty!

Powered by Google App Engine
This is Rietveld 408576698