summaryrefslogtreecommitdiffstats
path: root/ogcp/models.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-12-03 15:25:44 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2021-12-10 13:06:18 +0100
commit695c19f86ec361db8b316358ac9a0609ecfb020f (patch)
treef809c608c1438c4c05161d6506846172c1f91f01 /ogcp/models.py
parenta5681a4b850b198107d025213c5c8d26cd5634d2 (diff)
Add scope permission support
ogCP limits which scopes can use each user. Configuration file stores allowed scopes by their names. Leave scope list empty to give a user permissions on all scopes.
Diffstat (limited to 'ogcp/models.py')
-rw-r--r--ogcp/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ogcp/models.py b/ogcp/models.py
index 9ad40db..4b88a41 100644
--- a/ogcp/models.py
+++ b/ogcp/models.py
@@ -8,5 +8,6 @@
from flask_login import UserMixin
class User(UserMixin):
- def __init__(self, username):
+ def __init__(self, username, scopes):
self.id = username
+ self.scopes = scopes