- FastAPI backend: admin bootstrap with forced credential change, admin-created users with one-time generated passwords, roles as permission sets - Games and versions with content-addressed blob storage; forks copy only the manifest, so mods share assets with the original - Worker: archive/RPA extraction, unrpyc for .rpyc, own .rpy parser, Python subset translated via ast, media converted to WebP/Opus/WebM - React panel (library search, game page, upload, users, roles) and a framework-free web player with saves, history, skip/auto, transitions - docker compose: postgres, backend, worker, nginx on a single HTTP port Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
875 B
Python
21 lines
875 B
Python
"""Catalogue of permissions. Roles in the DB are named sets of these codes."""
|
|
|
|
PERMISSIONS: dict[str, str] = {
|
|
"games.play": "Просмотр каталога и игра",
|
|
"games.upload": "Загрузка новых игр",
|
|
"games.edit": "Редактирование карточек игр",
|
|
"games.delete": "Удаление игр и любых версий",
|
|
"versions.fork": "Создание своих версий (форков)",
|
|
"versions.manage_any": "Управление чужими версиями",
|
|
"users.manage": "Управление пользователями",
|
|
"roles.manage": "Управление ролями",
|
|
}
|
|
|
|
ALL = sorted(PERMISSIONS)
|
|
|
|
SYSTEM_ROLES: dict[str, list[str]] = {
|
|
"admin": ALL,
|
|
"moderator": ["games.play", "games.upload", "games.edit", "versions.fork"],
|
|
"player": ["games.play"],
|
|
}
|