import { createAccessControl } from "better-auth/plugins/access";
import { adminAc, defaultStatements } from "better-auth/plugins/admin/access";
/**
* make sure to use `as const` so typescript can infer the type correctly
*/
const statement = {
...defaultStatements,
} as const;
export const ac = createAccessControl(statement);
export const karyawan = ac.newRole({
});
export const manager = ac.newRole({
...adminAc.statements,
});
export const admin = ac.newRole({
...adminAc.statements,
});
import { createAccessControl } from "better-auth/plugins/access";
import { adminAc, defaultStatements } from "better-auth/plugins/admin/access";
/**
* make sure to use `as const` so typescript can infer the type correctly
*/
const statement = {
...defaultStatements,
} as const;
export const ac = createAccessControl(statement);
export const karyawan = ac.newRole({
});
export const manager = ac.newRole({
...adminAc.statements,
});
export const admin = ac.newRole({
...adminAc.statements,
});