Document the users, groups and roles model in README
CI / full-gate (push) Successful in 2m35s

This commit is contained in:
2026-08-03 11:39:26 +02:00
parent acce2d2556
commit ca3d49ec45
8 changed files with 195 additions and 72 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
import { can, CSRF_FIELD, GuardError, type NavNode, readFormBody, type RequestContext, requireSession, type RouteResult, type User } from "#plugin-api";
export const ADMIN_ROLE = "admin"; // role token gating the whole admin section
export const ADMIN_ROLE = "admin"; // the role gating the whole admin section
export const ADMIN_USERS_BASE = "/admin/users";
export const ADMIN_GROUPS_BASE = "/admin/groups";
export const ADMIN_ROLES_BASE = "/admin/roles";
+1 -1
View File
@@ -30,7 +30,7 @@ export default definePlugin({
label: "Scheduling",
}],
// Tokens this plugin introduces (docs + Keto seeding). Namespaced `<id>:<action>`.
// Roles this plugin introduces (docs + Keto seeding). Namespaced `<id>:<action>`.
roles: [
{ description: "View shifts", name: READ },
{ description: "Create and edit shifts", name: WRITE },
+2 -2
View File
@@ -10,8 +10,8 @@ import { can, CSRF_FIELD, GuardError, type PageChrome, parseListQuery, readFormB
export const SCHEDULING_PATH = "/scheduling"; // the plugin's public overview page
export const SHIFTS_PATH = "/scheduling/shifts";
export const READ = "scheduling:read"; // role name gating the list + nav
export const WRITE = "scheduling:write"; // role name gating create
export const READ = "scheduling:read"; // the role gating the list + nav
export const WRITE = "scheduling:write"; // the role gating create
export interface Shift {
id: string;