diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-30 19:33:19 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:44:39 +0200 |
| commit | eb82c4b678d60d74816d46df0f3b18b1760b7c6e (patch) | |
| tree | db1be1998a1f73ce8f8e77fa0ec902a8a731b685 /web-server/opendc/models/simulation.py | |
| parent | 61baf441680953b3d6fa47be0a69309570548fa4 (diff) | |
Revamp web server instructions
Diffstat (limited to 'web-server/opendc/models/simulation.py')
| -rw-r--r-- | web-server/opendc/models/simulation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web-server/opendc/models/simulation.py b/web-server/opendc/models/simulation.py index dbe1e800..86aa4726 100644 --- a/web-server/opendc/models/simulation.py +++ b/web-server/opendc/models/simulation.py @@ -17,8 +17,8 @@ class Simulation(Model): :param edit_access: True when edit access should be checked, otherwise view access. """ user = User.from_google_id(google_id) - authorizations = list( - filter(lambda x: str(x['simulationId']) == str(self.get_id()), user.obj['authorizations'])) + authorizations = list(filter(lambda x: str(x['simulationId']) == str(self.get_id()), + user.obj['authorizations'])) if len(authorizations) == 0 or (edit_access and authorizations[0]['authorizationLevel'] == 'VIEW'): raise ClientError(Response(403, "Forbidden from retrieving simulation.")) |
