refactor(users): some user refactoring and configuring
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { createAccessControl } from "better-auth/plugins/access";
|
||||
import { adminAc } from "better-auth/plugins/admin/access";
|
||||
|
||||
export const statement = {
|
||||
app: ["read", "create", "share", "update", "delete", "readAll"],
|
||||
user: ["ban"],
|
||||
//user: ["ban"],
|
||||
quality: ["read", "create", "share", "update", "delete", "readAll"],
|
||||
notifications: ["read", "create", "share", "update", "delete", "readAll"],
|
||||
} as const;
|
||||
@@ -20,7 +21,8 @@ export const admin = ac.newRole({
|
||||
|
||||
export const systemAdmin = ac.newRole({
|
||||
app: ["read", "create", "share", "update", "delete", "readAll"],
|
||||
user: ["ban"],
|
||||
//user: ["ban"],
|
||||
quality: ["read", "create", "share", "update", "delete", "readAll"],
|
||||
notifications: ["read", "create", "share", "update", "delete", "readAll"],
|
||||
...adminAc.statements,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user