diff options
Diffstat (limited to 'opendc/models_old/trace.py')
| -rw-r--r-- | opendc/models_old/trace.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/opendc/models_old/trace.py b/opendc/models_old/trace.py new file mode 100644 index 00000000..58abe058 --- /dev/null +++ b/opendc/models_old/trace.py @@ -0,0 +1,14 @@ +from opendc.models_old.model import Model + + +class Trace(Model): + JSON_TO_PYTHON_DICT = {'Trace': {'id': 'id', 'name': 'name'}} + + COLLECTION_NAME = 'traces' + COLUMNS = ['id', 'name'] + COLUMNS_PRIMARY_KEY = ['id'] + + 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 Trace.""" + + return authorization_level not in ['EDIT', 'OWN'] |
