fix(naming): snake_case authentik_ tables and authentik.* permissions (owner naming rule) #6

Merged
KofTwentyTwo merged 3 commits from feature/snake-case-table-names into develop 2026-10-12 20:57:44 +00:00
3 Commits
Author SHA1 Message Date
james.maes 97ccdc6cd0 Merge develop into feature/snake-case-table-names 2026-10-12 15:51:44 -05:00
james.maesandClaude Opus 5.5 338b591a7f fix(naming): rename identity.* permissions to authentik.* (owner naming rule)
Permissions follow the owner's full-name rule (2026-10-12; spec #1065
amended in 8ee607610): identity.users.read -> authentik.users.read, etc.,
same suffixes; the wildcard is authentik.*.

- IdentityPermission names and WILDCARD renamed; @Deprecated
  LEGACY_PREFIX, LEGACY_WILDCARD and getLegacyShortName() keep the old
  names for upgrade scripts. Legacy names are never granted: the resolver
  reports them as unknown and the drift report warns on them.
- UPGRADE.md: rename table, update qqq.io/permissions group attributes
  (UI or blueprint) before deploying, sample SQL for host-stored grants,
  sign users out afterwards.
- Code comments, drift messages, test fixtures, the test bootstrap
  blueprint, README, CHANGELOG and docs/DESIGN.md use authentik.*.
  The identity-admins group and the "Identity" app label are unchanged.
- Tests: IdentityPermissionTest (names, session form, legacy names not
  resolved), resolver test that legacy grants are unknown and grant
  nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:29:15 -05:00
james.maesandClaude Opus 5.5 ecad3e2e5b fix(naming): snake_case authentik_ table names (owner naming rule)
Table names are now lowercase snake_case prefixed with the qbit name:
authentik_user, authentik_group, authentik_group_member,
authentik_session, authentik_event (were authentikUser, ...).

- AuthentikQBitConfig.applyTablePrefix(name) = snake(prefix) + "_" +
  snake(name), plus a toSnakeCase helper. applyPrefix keeps the camelCase
  join for apps, widgets, the backend and processes (authentikAdmin,
  authentikApi), as spec #1065 says.
- @Deprecated AuthentikTables.LEGACY_*_TABLE_NAME constants hold the old
  names for upgrade scripts.
- UPGRADE.md covers stored references (permissions, saved views, audit
  table names, links). API-backed tables, so no DDL.
- README, CHANGELOG and docs/DESIGN.md use the new names.
- Tests: snake helper, prefix composition (default, empty, custom
  camelCase prefix), producer and contract tests on the new names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:16:37 -05:00