Files
nuxt-can/playground/permissions/__can__.ts
2025-11-14 19:31:34 +01:00

13 lines
283 B
TypeScript

export function __can__(...path: string[]) {
const key = path.join('.')
const allowed = new Set([
'employee.view',
'employee.edit',
'contract.create',
])
const granted = allowed.has(key)
console.log('Checking permission:', key, '->', granted)
return false
}