Add super manager role

This commit is contained in:
Ruslan Bakiev
2026-04-04 09:41:36 +07:00
parent da7cad207c
commit 6b966c763e
5 changed files with 267 additions and 33 deletions

View File

@@ -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)) {