Files
nuxt-can/test/fixtures/basic/permissions/__can__.ts
2025-11-14 06:15:33 +01:00

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)
}