mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 09:21:02 +00:00
@@ -32,3 +32,7 @@ class ActionChoices(BitChoices):
|
||||
def has_perm(cls, action_name, total):
|
||||
action_value = getattr(cls, action_name)
|
||||
return action_value & total == action_value
|
||||
|
||||
@classmethod
|
||||
def display(cls, value):
|
||||
return ', '.join([c.label for c in cls if c.value & value == c.value])
|
||||
|
Reference in New Issue
Block a user