Implement account management features in API, including endpoints for listing accounts and updating account roles. Introduce moderator role with associated permissions, and refactor access control checks to accommodate staff roles. Update database schema to support new role constraints and enhance frontend navigation for staff access.
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / compose (push) Has been cancelled

This commit is contained in:
2026-07-19 02:32:15 +03:00
parent 4b889fb8a0
commit 1a5a39baf0
18 changed files with 726 additions and 74 deletions

View File

@@ -0,0 +1,10 @@
-- +mixmaker Up
ALTER TABLE accounts
DROP CONSTRAINT IF EXISTS accounts_role_check,
ADD CONSTRAINT accounts_role_check CHECK (role IN ('admin', 'moderator', 'player'));
-- +mixmaker Down
UPDATE accounts SET role = 'player' WHERE role = 'moderator';
ALTER TABLE accounts
DROP CONSTRAINT IF EXISTS accounts_role_check,
ADD CONSTRAINT accounts_role_check CHECK (role IN ('admin', 'player'));