mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Grant superusers permission to decrypt all secrets
This commit is contained in:
parent
966ea45050
commit
edde021c85
@ -304,4 +304,6 @@ class Secret(CreatedUpdatedModel):
|
||||
"""
|
||||
Check whether the given user has permission to decrypt this Secret.
|
||||
"""
|
||||
if user.is_superuser:
|
||||
return True
|
||||
return user in self.role.users.all() or user.groups.filter(pk__in=self.role.groups.all()).exists()
|
||||
|
Loading…
Reference in New Issue
Block a user