mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
fix(auth): rename seeded permission groups to Viewer and Editor
Every install showed "Viewer (legacy)" and "Editor (legacy)" as the built-in groups, which reads as deprecated. 0092 already shipped in 5.3.0, so a new revision renames the untouched system rows and drops the "pre-upgrade" framing from their descriptions. It skips a group whose target name an admin already took, and keeps a description the admin edited. Fixes #4678 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xdb9FnfhEqP6ectkSZ2T3F
This commit is contained in:
4
.github/scripts/seed_e2e_users.py
vendored
4
.github/scripts/seed_e2e_users.py
vendored
@@ -10,7 +10,7 @@ Two accounts, matching the two sides of every permission assertion:
|
||||
|
||||
* ``e2e_admin`` — role admin, so `useCan` short-circuits to true and every
|
||||
gated affordance must be present.
|
||||
* ``e2e_viewer`` — the seeded "Viewer (legacy)" group, i.e. library read plus
|
||||
* ``e2e_viewer`` — the seeded "Viewer" group, i.e. library read plus
|
||||
own collections/assets. Every ROM write affordance must be absent.
|
||||
|
||||
Never point this at a real library: it writes users with a known password.
|
||||
@@ -32,7 +32,7 @@ from handler.auth import auth_handler # noqa: E402
|
||||
from handler.database import db_permission_handler, db_user_handler # noqa: E402
|
||||
from models.user import Role, User # noqa: E402
|
||||
|
||||
VIEWER_GROUP_NAME = "Viewer (legacy)"
|
||||
VIEWER_GROUP_NAME = "Viewer"
|
||||
|
||||
E2E_ADMIN_USERNAME = "e2e_admin"
|
||||
E2E_VIEWER_USERNAME = "e2e_viewer"
|
||||
|
||||
Reference in New Issue
Block a user