Add super manager role
This commit is contained in:
@@ -6,10 +6,10 @@ const [, , emailArg, roleArg = 'MANAGER'] = process.argv;
|
||||
|
||||
const email = String(emailArg || '').trim().toLowerCase();
|
||||
const role = String(roleArg || '').trim().toUpperCase();
|
||||
const allowedRoles = new Set(['CLIENT', 'MANAGER']);
|
||||
const allowedRoles = new Set(['CLIENT', 'MANAGER', 'SUPER_MANAGER']);
|
||||
|
||||
if (!email) {
|
||||
throw new Error('Usage: node scripts/set-user-role.js <email> [CLIENT|MANAGER]');
|
||||
throw new Error('Usage: node scripts/set-user-role.js <email> [CLIENT|MANAGER|SUPER_MANAGER]');
|
||||
}
|
||||
|
||||
if (!allowedRoles.has(role)) {
|
||||
|
||||
Reference in New Issue
Block a user