feat: 프로필별 플레이 감사 조회와 권한 검사 연결

This commit is contained in:
2026-09-16 02:52:52 +00:00
parent 35155e6b59
commit ed2597aef3
12 changed files with 718 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
/** Gateway capability resolver와 같은 명시적 전권·범위 규칙. 인게임 직책은 사용하지 않는다. */
export const canReadPlayAudit = (roles: readonly string[], profileName: string): boolean =>
roles.some(
(role) =>
role === 'superuser' ||
role === 'admin.superuser' ||
role === 'admin.playAudit.read' ||
role === 'admin.playAudit.read:*' ||
role === `admin.playAudit.read:${profileName}`
);
export const canReadPlayAuditAccounts = (roles: readonly string[], profileName: string): boolean =>
canReadPlayAudit(roles, profileName) &&
roles.some((role) => role === 'superuser' || role === 'admin.superuser' || role === 'admin.playAudit.accounts');
+1
View File
@@ -32,3 +32,4 @@ export * from './gateway/runtimeDiagnostics.js';
export * from './game/accessPenalty.js';
export * from './http/trpcTransport.js';
export * from './webPush/types.js';
export { canReadPlayAudit, canReadPlayAuditAccounts } from './auth/playAudit.js';