mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 16:16:02 +00:00
38 lines
984 B
TypeScript
38 lines
984 B
TypeScript
import { Permission } from "auth/authorize/Permission";
|
|
import { s } from "bknd/utils";
|
|
|
|
export const accessAdmin = new Permission("system.access.admin");
|
|
export const accessApi = new Permission("system.access.api");
|
|
export const configRead = new Permission(
|
|
"system.config.read",
|
|
{},
|
|
s.object({
|
|
module: s.string().optional(),
|
|
}),
|
|
);
|
|
export const configReadSecrets = new Permission(
|
|
"system.config.read.secrets",
|
|
{},
|
|
s.object({
|
|
module: s.string().optional(),
|
|
}),
|
|
);
|
|
export const configWrite = new Permission(
|
|
"system.config.write",
|
|
{},
|
|
s.object({
|
|
module: s.string().optional(),
|
|
}),
|
|
);
|
|
export const schemaRead = new Permission(
|
|
"system.schema.read",
|
|
{},
|
|
s.object({
|
|
module: s.string().optional(),
|
|
}),
|
|
);
|
|
export const build = new Permission("system.build");
|
|
export const mcp = new Permission("system.mcp");
|
|
export const info = new Permission("system.info");
|
|
export const openapi = new Permission("system.openapi");
|