This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user