perf: 增加分享权限位

This commit is contained in:
Eric
2023-11-08 17:46:32 +08:00
committed by Eric_Lee
parent 5ab8ff4fde
commit 3eb1583c69
3 changed files with 29 additions and 4 deletions

View File

@@ -262,10 +262,8 @@ class BitChoices(models.IntegerChoices, TreeChoices):
@classmethod
def all(cls):
value = 0
for c in cls:
value |= c.value
return value
# 权限 12 位 最大值
return 4095
class PortRangeField(models.CharField):