feat: allow manage role to update any product under same head
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 4s

This commit is contained in:
Methapon2001 2025-07-08 17:17:07 +07:00
parent 842d81026e
commit f9c4d579c4
3 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ const MANAGE_ROLES = [
];
function globalAllow(user: RequestWithUser["user"]) {
const listAllowed = ["system", "head_of_admin", "admin", "executive", "accountant"];
const listAllowed = MANAGE_ROLES;
return user.roles?.some((v) => listAllowed.includes(v)) || false;
}

View file

@ -59,7 +59,7 @@ const MANAGE_ROLES = [
];
function globalAllow(user: RequestWithUser["user"]) {
const listAllowed = ["system", "head_of_admin", "admin", "executive", "accountant"];
const listAllowed = MANAGE_ROLES;
return user.roles?.some((v) => listAllowed.includes(v)) || false;
}

View file

@ -50,7 +50,7 @@ const MANAGE_ROLES = [
];
function globalAllow(user: RequestWithUser["user"]) {
const listAllowed = ["system", "head_of_admin", "admin", "executive", "accountant"];
const listAllowed = MANAGE_ROLES;
return user.roles?.some((v) => listAllowed.includes(v)) || false;
}