From 693f5255b1041b293bea3ff9f39cbe90c6c29eb9 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 26 Oct 2022 17:49:17 +0200 Subject: 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. --- ogcp/views.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ogcp') 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) -- cgit v1.2.3-18-g5258