Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { createAccessControl } from "better-auth/plugins/access";
- export const statement = {
- project: ["create", "share", "update", "delete"], // <-- Permissions available for created roles
- user: ["ban"],
- } as const;
- export const ac = createAccessControl(statement);
- export const User = ac.newRole({
- project: ["create"],
- });
- export const Admin = ac.newRole({
- project: ["create", "update"],
- });
- export const SiteAdministrator = ac.newRole({
- project: ["create", "update", "delete"],
- user: ["ban"],
- });
Advertisement
Add Comment
Please, Sign In to add comment