11 lines
225 B
TypeScript
11 lines
225 B
TypeScript
const granted = new Set([
|
|
'employee.view',
|
|
'employee.edit',
|
|
'contract.create',
|
|
])
|
|
|
|
export function __can__(path: string[]) {
|
|
const key = Array.isArray(path) ? path.join('.') : String(path)
|
|
return granted.has(key)
|
|
}
|