fix(server): add role aliases in roles.py to fix broken admin_router imports
This commit is contained in:
@@ -9,6 +9,19 @@ class UserRole(IntEnum):
|
||||
ELDER = 3 # Elder Moderator
|
||||
CREATOR = 4 # Создатель
|
||||
|
||||
# Aliases for backwards compatibility with admin_router.py
|
||||
ROLE_USER = UserRole.USER
|
||||
ROLE_PASS_HOLDER = UserRole.PASS_HOLDER
|
||||
ROLE_MODERATOR = UserRole.MODERATOR
|
||||
ROLE_ELDER = UserRole.ELDER
|
||||
ROLE_CREATOR = UserRole.CREATOR
|
||||
|
||||
__all__ = [
|
||||
"UserRole", "ROLE_USER", "ROLE_PASS_HOLDER", "ROLE_MODERATOR",
|
||||
"ROLE_ELDER", "ROLE_CREATOR", "ROLE_NAMES", "Permissions",
|
||||
"ROLE_PERMISSIONS", "has_permission", "require_permission",
|
||||
]
|
||||
|
||||
ROLE_NAMES: Dict[int, str] = {
|
||||
UserRole.USER: "Игрок",
|
||||
UserRole.PASS_HOLDER: "Игрок [Проходка]",
|
||||
|
||||
Reference in New Issue
Block a user