perf: 修改 connect token

This commit is contained in:
ibuler
2022-11-23 16:11:17 +08:00
parent 075cadb1ab
commit abfd472a0a
5 changed files with 72 additions and 73 deletions

View File

@@ -28,8 +28,16 @@ class ActionChoices(BitChoices):
)
@classmethod
def has_perm(cls, action_name, total):
action_value = getattr(cls, action_name)
def transfer(cls):
return cls.upload | cls.download
@classmethod
def clipboard(cls):
return cls.copy | cls.paste
@classmethod
def contains(cls, total, action):
action_value = getattr(cls, action)
return action_value & total == action_value
@classmethod