feat: 프로필별 플레이 감사 조회와 권한 검사 연결
This commit is contained in:
@@ -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');
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user