feat: wire global runtime injection and playground
This commit is contained in:
10
test/fixtures/basic/permissions/__can__.ts
vendored
Normal file
10
test/fixtures/basic/permissions/__can__.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user