feat: add directive transformer runtime
This commit is contained in:
12
playground/permissions/__can__.ts
Normal file
12
playground/permissions/__can__.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function __can__(path: string[]) {
|
||||
const key = path.join('.')
|
||||
const allowed = new Set([
|
||||
'employee.view',
|
||||
'employee.edit',
|
||||
'contract.create',
|
||||
])
|
||||
|
||||
// return allowed.has(key)
|
||||
console.log('Checking permission:', key)
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user