feat: change listAllowed
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s

This commit is contained in:
Kanjana 2025-07-09 17:26:49 +07:00
parent 73fea9d9ed
commit 15e0e34a47

View file

@ -57,7 +57,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;
}