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
Example: you have an API route /routes/api/projects/[id]/+server.ts
You could have a permission allowing you access to all projects, such as project:* or you might want a token that only allows access to a specific project, so would have a permission like project:world-domination
Fairly easy to do, but maybe not obvious:
exportasyncfunctionGET({ locals, params }){const{ id }=paramsawaitlocals.api.any(`project:*`,`project:${id}`).approve(limit)// rest of code}
The text was updated successfully, but these errors were encountered:
Example: you have an API route
/routes/api/projects/[id]/+server.ts
You could have a permission allowing you access to all projects, such as
project:*
or you might want a token that only allows access to a specific project, so would have a permission likeproject:world-domination
Fairly easy to do, but maybe not obvious:
The text was updated successfully, but these errors were encountered: