blob: c3c98b7a092f2b8269d6274a64a60a044d230d2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from opendc.models.model import Model
class Scheduler(Model):
JSON_TO_PYTHON_DICT = {'Scheduler': {'name': 'name'}}
COLLECTION_NAME = 'schedulers'
COLUMNS = ['name']
COLUMNS_PRIMARY_KEY = ['name']
def google_id_has_at_least(self, google_id, authorization_level):
"""Return True if the user has at least the given auth level over this Scheduler."""
return authorization_level not in ['EDIT', 'OWN']
|