mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-21 09:34:08 +03:00
Update integrity hashes in admin index HTML and enhance permissions handling for server groups
This commit is contained in:
parent
f97c776399
commit
ad33b1f57a
@ -70,6 +70,9 @@ class Permissions(Handler):
|
|||||||
'metapools': models.MetaPool,
|
'metapools': models.MetaPool,
|
||||||
'accounts': models.Account,
|
'accounts': models.Account,
|
||||||
'mfa': models.MFA,
|
'mfa': models.MFA,
|
||||||
|
'servers-groups': models.ServerGroup,
|
||||||
|
'tunnels-tunnels': models.ServerGroup, # Same as servers-groups, but different items
|
||||||
|
|
||||||
}.get(class_name, None)
|
}.get(class_name, None)
|
||||||
|
|
||||||
if cls is None:
|
if cls is None:
|
||||||
@ -115,6 +118,10 @@ class Permissions(Handler):
|
|||||||
Processes get requests
|
Processes get requests
|
||||||
"""
|
"""
|
||||||
logger.debug('Permissions args for GET: %s', self._args)
|
logger.debug('Permissions args for GET: %s', self._args)
|
||||||
|
|
||||||
|
# Update some XXX/YYYY to XXX-YYYY (as server/groups, that is a valid class name)
|
||||||
|
if len(self._args) == 3:
|
||||||
|
self._args = [self._args[0]+ '-' + self._args[1], self._args[2]]
|
||||||
|
|
||||||
if len(self._args) != 2:
|
if len(self._args) != 2:
|
||||||
raise exceptions.rest.RequestError('Invalid request')
|
raise exceptions.rest.RequestError('Invalid request')
|
||||||
@ -129,6 +136,13 @@ class Permissions(Handler):
|
|||||||
Processes put requests
|
Processes put requests
|
||||||
"""
|
"""
|
||||||
logger.debug('Put args: %s', self._args)
|
logger.debug('Put args: %s', self._args)
|
||||||
|
|
||||||
|
# Update some XXX/YYYY to XXX-YYYY (as server/groups, that is a valid class name)
|
||||||
|
if len(self._args) == 6:
|
||||||
|
self._args = [self._args[0]+ '-' + self._args[1], self._args[2], self._args[3], self._args[4], self._args[5]]
|
||||||
|
|
||||||
|
if len(self._args) != 5:
|
||||||
|
raise exceptions.rest.RequestError('Invalid request')
|
||||||
|
|
||||||
perm = uds.core.types.permissions.PermissionType.from_str(self._params.get('perm', '0'))
|
perm = uds.core.types.permissions.PermissionType.from_str(self._params.get('perm', '0'))
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -102,6 +102,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</uds-root>
|
</uds-root>
|
||||||
<link rel="modulepreload" href="/uds/res/admin/chunk-2F3F2YC2.js?stamp=1734623010" integrity="sha384-VVOra5xy5Xg9fYkBmK9MLhX7vif/MexRAaLIDBsQ4ZlkF31s/U6uWWrj+LAnvX/q"><script src="/uds/res/admin/polyfills.js?stamp=1734623010" type="module" crossorigin="anonymous" integrity="sha384-TVRkn44wOGJBeCKWJBHWLvXubZ+Julj/yA0OoEFa3LgJHVHaPeeATX6NcjuNgsIA"></script><script src="/uds/res/admin/main.js?stamp=1734623010" type="module" crossorigin="anonymous" integrity="sha384-ILkamIHuGaaiMW1mFhxAq9qPpvf9o1yomwu8HeEjJC+YVTbMBxjS0KW9n8brQ6VF"></script></body>
|
<link rel="modulepreload" href="/uds/res/admin/chunk-2F3F2YC2.js?stamp=1734709913" integrity="sha384-VVOra5xy5Xg9fYkBmK9MLhX7vif/MexRAaLIDBsQ4ZlkF31s/U6uWWrj+LAnvX/q"><script src="/uds/res/admin/polyfills.js?stamp=1734709913" type="module" crossorigin="anonymous" integrity="sha384-TVRkn44wOGJBeCKWJBHWLvXubZ+Julj/yA0OoEFa3LgJHVHaPeeATX6NcjuNgsIA"></script><script src="/uds/res/admin/main.js?stamp=1734709913" type="module" crossorigin="anonymous" integrity="sha384-93I2Kxdzyvq31qIfKcSe5/fBdFRg8L73nRk6uSjj5dclx4nlLL+yA0AxUBG4R6w9"></script></body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user