From 37f2b2745118032af80589fe41cab227fa3831ad Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 15 Dec 2025 13:04:57 +0000 Subject: [PATCH] feat: add Role type for RBAC --- surfsense_web/contracts/types/rbac.types.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 surfsense_web/contracts/types/rbac.types.ts diff --git a/surfsense_web/contracts/types/rbac.types.ts b/surfsense_web/contracts/types/rbac.types.ts new file mode 100644 index 000000000..f90656a49 --- /dev/null +++ b/surfsense_web/contracts/types/rbac.types.ts @@ -0,0 +1,14 @@ +import { z } from "zod"; + +export const role = z.object({ + id: z.number(), + name: z.string().min(1).max(100), + description: z.string().max(500).nullable(), + permissions: z.array(z.string()), + is_default: z.boolean(), + is_system_role: z.boolean(), + search_space_id: z.number(), + created_at: z.string(), +}); + +export type Role = z.infer; \ No newline at end of file