fix: can access quotation
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
6b55701afb
commit
9999a49fa0
4 changed files with 25 additions and 12 deletions
|
|
@ -276,8 +276,10 @@ const permissions = {
|
|||
view: allRoles,
|
||||
},
|
||||
quotation: {
|
||||
edit: allRoles.slice(0, 9).filter((r) => r !== 'branch_accountant'),
|
||||
view: allRoles.slice(0, 9),
|
||||
create: allRoles.slice(0, 9).filter((r) => r !== 'branch_accountant'),
|
||||
edit: allRoles.slice(0, 9),
|
||||
delete: allRoles.slice(0, 6),
|
||||
view: allRoles,
|
||||
},
|
||||
taskOrder: {
|
||||
create: [...allRoles.slice(0, 6), 'data_entry'],
|
||||
|
|
@ -305,7 +307,7 @@ const permissions = {
|
|||
|
||||
export function canAccess(
|
||||
menu: keyof typeof permissions,
|
||||
action: 'edit' | 'create' | 'view' = 'view',
|
||||
action: 'edit' | 'create' | 'delete' | 'view' = 'view',
|
||||
): boolean {
|
||||
// uma_authorization = all roles
|
||||
const roles = getRole() ?? [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue