feat(perm): update api account related permission
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 4s

This commit is contained in:
Methapon2001 2025-07-03 14:33:00 +07:00
parent d08327afb6
commit 68025aad08
5 changed files with 44 additions and 30 deletions

View file

@ -150,14 +150,14 @@ const MANAGE_ROLES = [
"system",
"head_of_admin",
"admin",
"head_of_accountant",
"accountant",
"branch_accountant",
"head_of_sale",
"sale",
];
function globalAllow(user: RequestWithUser["user"]) {
const allowList = ["system", "head_of_admin", "head_of_accountant", "head_of_sale"];
const allowList = ["system", "head_of_admin", "accountant", "head_of_sale"];
return allowList.some((v) => user.roles?.includes(v));
}