(action: string)
| 38 | ]; |
| 39 | |
| 40 | export function parsePermissionAction(action: string): PermissionAction { |
| 41 | const normalized = action.trim().toLowerCase(); |
| 42 | if (normalized === 'grant') return 'grant'; |
| 43 | if (normalized === 'deny') return 'deny'; |
| 44 | if (normalized === 'reset') return 'reset'; |
| 45 | throw new AppError('INVALID_ARGS', `Invalid permission action: ${action}. Use grant|deny|reset.`); |
| 46 | } |
| 47 | |
| 48 | export function parsePermissionTarget(value: string | undefined): PermissionTarget { |
| 49 | const normalized = value?.trim().toLowerCase(); |
no outgoing calls
no test coverage detected