mirror of https://git.48k.eu/ogcp
views: allow scope server data in restricted user mode
Add the server scope during scope filtering for user accounts with restricted scope access. The HTML server scope component in the sidebar holds important information as a hidden component. The removal of the server scope also removes the respective HTML component in the web. Missing server scopes result in a backtrace while trying to get data such as server IP.master
parent
454999a895
commit
c2fd182fb6
|
@ -221,7 +221,7 @@ def add_state_and_ips(scope, clients, ips):
|
|||
|
||||
def get_allowed_scopes(scopes, allowed_scopes):
|
||||
for scope in scopes.get('scope'):
|
||||
if scope.get('name') in current_user.scopes:
|
||||
if scope.get('name') in current_user.scopes or scope.get('type') == 'server':
|
||||
allowed_scopes.append(scope)
|
||||
else:
|
||||
get_allowed_scopes(scope, allowed_scopes)
|
||||
|
|
Loading…
Reference in New Issue