feat(auth): integrate normalizePermissionKeys for consistent permission handling
Build and Push Auth Portal Docker Image / build-and-push (push) Successful in 1m54s
Build and Push Auth Portal Docker Image / create-release (push) Skipped

- Updated auth, admin, and auth-guards routes to utilize normalizePermissionKeys for permissions.
- Enhanced permission mapping to ensure legacy keys are correctly transformed to current catalog keys.
- Improved overall permission validation and user access management across the application.
This commit is contained in:
Denozordec committed 2026-07-19 00:19:18 +07:00
1 parent cfbe1fceda
commit 21d6603b57
4 files changed
+42 -11

No files matched your search

+4 -2
View File
@@ -6,7 +6,7 @@ import {
type UserRow,
} from '@authportal/db'
import type { AppId, MeResponse } from '@authportal/shared'
import { APP_IDS } from '@authportal/shared'
import { APP_IDS, normalizePermissionKeys } from '@authportal/shared'
export type AuthUser = {
id: string
@@ -68,7 +68,9 @@ export function loadAuthUser(
user: UserRow,
): AuthUser {
const apps = getUserApps(request.server.db, user.id)
const permissions = getUserPermissions(request.server.db, user.id)
const permissions = normalizePermissionKeys(
getUserPermissions(request.server.db, user.id),
)
return {
id: user.id,
email: user.email,