feat: mirror v-can guard chains

This commit is contained in:
stanig2106
2025-11-14 19:23:18 +01:00
parent 2c4fe3f353
commit 7d823307fa
16 changed files with 573 additions and 138 deletions

View File

@@ -1,4 +1,4 @@
export function __can__(path: string[]) {
export function __can__(...path: string[]) {
const key = path.join('.')
const allowed = new Set([
'employee.view',
@@ -8,5 +8,5 @@ export function __can__(path: string[]) {
const granted = allowed.has(key)
console.log('Checking permission:', key, '->', granted)
return granted
return false
}