mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 17:01:09 +00:00
pref: 修改 perm token
This commit is contained in:
@@ -27,6 +27,11 @@ class ActionChoices(BitChoices):
|
||||
(_("Clipboard"), [cls.copy, cls.paste]),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def has_perm(cls, action_name, total):
|
||||
action_value = getattr(cls, action_name)
|
||||
return action_value & total == action_value
|
||||
|
||||
|
||||
class SpecialAccount(models.TextChoices):
|
||||
ALL = "@ALL", "All"
|
||||
|
Reference in New Issue
Block a user