1
0
forked from ScoDoc/ScoDoc

Fix: display role permissions

This commit is contained in:
Emmanuel Viennet 2022-05-04 20:40:20 +02:00
parent fbe480902b
commit b930406be9

View File

@ -70,7 +70,8 @@ class Permission(object):
setattr(Permission, symbol, perm)
Permission.description[symbol] = description
Permission.permission_by_name[symbol] = perm
Permission.NBITS = len(_SCO_PERMISSIONS)
max_perm = max(p[0] for p in _SCO_PERMISSIONS)
Permission.NBITS = max_perm.bit_length()
@staticmethod
def get_by_name(permission_name: str) -> int: