Commit Graph

7 Commits

Author SHA1 Message Date
Georges-Antoine Assi
5cad653261 fix(auth): look up seeded permission groups by a stable system key
Tests, fixtures and the e2e seed found the seeded groups by display name,
which an admin can edit and this PR just changed. A unique system_key
column (viewer/editor), added and backfilled by 0137, identifies them
instead, and get_system_group() replaces the name lookups.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 10:42:44 -04:00
Georges-Antoine Assi
3068ae9d97 refactor(auth): simplify group rename migration and e2e seed lookup (simplify)
The e2e seed resolves the viewer via get_default_group instead of a list
of fallback names. The migration drops the id pre-select, and the tests
load the revision once and call upgrade/downgrade directly.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 10:32:36 -04:00
Georges-Antoine Assi
f3e045196f fix(auth): renumber group rename migration to 0137 (code-review)
Master already chains 0135 and 0136 onto 0134, so the rename becomes
0137 revising 0136_deleted_assets to keep a single alembic head. Also
dedupe the migration filename in tests, rename tests that still said
legacy, and drop em-dashes and a long docstring.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 10:30:17 -04:00
Sam Dornan
bb5d210530 fix(auth): find the seeded Viewer by system flag in the e2e seed
Address Greptile review: the e2e seed could pick an admin-created "Viewer"
group, the migration docstring recounted history, and the conflict test
compared a description with itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xdb9FnfhEqP6ectkSZ2T3F
2026-09-25 00:50:30 +00:00
Sam Dornan
86fa809612 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
2026-09-25 00:36:34 +00:00
Georges-Antoine Assi
7ceef7647a cleanup 2026-07-26 13:17:42 -04:00
Georges-Antoine Assi
474ef5b6e8 Move the e2e seed scripts to .github/scripts
They exist to stand up a disposable instance for the Playwright suite, so
they belong with the workflow that runs them rather than in backend/tools/
next to the library-generation utilities.

Their sys.path bootstrap now points at backend/ explicitly (it relied on
being one level below it), the workflow invokes them from the repo root
instead of backend/, and .github/scripts/** joins the workflow's path
filters so editing a seeder still triggers the suite.
2026-07-26 13:05:54 -04:00