This commit is contained in:
@@ -81,8 +81,8 @@ function displayName(value: unknown, fallback: string): string {
|
||||
return name.trim();
|
||||
}
|
||||
function role(value: unknown): UserRole {
|
||||
if (!['admin', 'operator', 'viewer'].includes(value as string))
|
||||
throw new AuthError('Choose administrator, operator or viewer.');
|
||||
if (!['admin', 'super_viewer', 'operator', 'viewer'].includes(value as string))
|
||||
throw new AuthError('Choose administrator, super viewer, operator or viewer.');
|
||||
return value as UserRole;
|
||||
}
|
||||
export function recordAudit(
|
||||
|
||||
Reference in New Issue
Block a user