summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-10-26 17:49:17 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-11-07 12:58:27 +0100
commit693f5255b1041b293bea3ff9f39cbe90c6c29eb9 (patch)
tree4b8a6b6f3caf0c0931df7b4d8b54cb3dce6828d4
parent0f6641d92f40da61c83d518b7c9c54a53daa6943 (diff)
Assign servers to users
Instead of give permissions on all centers of a server selecting each one of them, you can select the server that contains all this centers.
-rw-r--r--ogcp/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index e0911b0..8e40ce6 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1483,6 +1483,9 @@ def get_available_scopes():
responses = multi_request('get', '/scopes')
available_scopes = list()
for resp in responses:
+ servers = parse_scopes_from_tree(resp['json'], 'server')
+ servers = [(server['name'], server['name']) for server in servers]
+ available_scopes.extend(servers)
centers = parse_scopes_from_tree(resp['json'], 'center')
centers = [(center['name'], center['name']) for center in centers]
available_scopes.extend(centers)