You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This decorator can accept permission conditions required
to access the resource. For example:
```
@Permission(({ args }) =>
Promise.resolve({
or: [
{ type: 'global', permission: P.global.VIEW_ANY_PLAN_DATA },
{ type: 'plan', permission: P.plan.VIEW_DATA, id: args.id },
],
})
)
```
If only global permission check is needed, it can be used directly:
```
@Permission({
type: 'global',
permission: P.global.VIEW_ALL_JOBS,
})
```
0 commit comments