Roles and permissions
Every member has one role, and a role is a set of permissions.
Role |
|
|
|
|---|---|---|---|
| yes | yes | yes |
| yes | no | no |
| yes | no | yes |
const { has } = await auth();
if (!has({ permission: "billing:manage" })) return new Response("Forbidden", { status: 403 });Updated
What did you think of this content?