From 632defb344a97522968024adfee9c6a03a553532 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Dec 2026 08:03:46 +0000 Subject: [PATCH] Document who may add and change Training materials (CP-9474) Team Leaders and Project Editors can now add Training materials and change the ones they own; owners may be any of those or an Organisation Admin. Updates openapi.yaml and the endpoint cards. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F1a5xnbiFDDo5g2obqhnC8 --- openapi.yaml | 14 ++++++++------ server.js | 10 +++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 3bd17f0..96cf1e0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3486,8 +3486,8 @@ paths: The Organisation's Training materials, as on the Training materials page under Helpdesk: links to its own training documents and videos (Google Docs, Word Online, SharePoint, Loom and so on). Returns only those the caller may see: an Organisation Admin or System Access user sees them all; anyone else sees those linked to - the whole Organisation, to a Team they are in, or to a Workspace they hold a role on. Someone with no part in - the Organisation gets 403. `project_id` narrows the list to the materials linked to one Workspace. + the whole Organisation, to a Team they are in, or to a Workspace they hold a role on, and those they own. + Someone with no part in the Organisation gets 403. `project_id` narrows the list to the materials linked to one Workspace. operationId: listTrainingMaterials security: [{tokenAuth: []}] parameters: @@ -3525,7 +3525,8 @@ paths: Adds a link to one of the Organisation's training documents or videos, and says who it is for: the whole Organisation (`all_organisation`), or one or more Teams (`team_ids`) and Workspaces (`project_ids`). At least one is required. Makerble keeps only the link, so share the document with the same people. The owner defaults to - the caller. An Organisation Admin of the Organisation, or a System Access user. + the caller and must be an Organisation Admin, Team Leader or Project Editor of the Organisation. An + Organisation Admin, Team Leader or Project Editor of the Organisation, or a System Access user. operationId: createTrainingMaterial security: [{tokenAuth: []}] requestBody: @@ -3573,7 +3574,8 @@ paths: description: | Changes only the fields sent. `team_ids` and `project_ids` replace the Teams and Workspaces it is linked to. Send `mark_as_reviewed: true` to set its last reviewed date to now ("Mark as reviewed"). An Organisation Admin of - the Organisation, or a System Access user. + the Organisation or a System Access user can change any of them; a Team Leader or Project Editor only those + they own. operationId: updateTrainingMaterial security: [{tokenAuth: []}] requestBody: @@ -3609,7 +3611,7 @@ paths: delete: tags: [Training Materials] summary: Remove a Training material - description: Removes the link from Makerble. The document itself is not touched. An Organisation Admin of the Organisation, or a System Access user. + description: Removes the link from Makerble. The document itself is not touched. An Organisation Admin of the Organisation or a System Access user can remove any of them; a Team Leader or Project Editor only those they own. operationId: deleteTrainingMaterial security: [{tokenAuth: []}] responses: @@ -26922,7 +26924,7 @@ components: review_due: type: boolean nullable: true - description: Last reviewed more than 12 months ago. Null unless the caller can manage the Organisation's Training materials. + description: Last reviewed more than 12 months ago. Null unless the caller can change this Training material. created_at: type: string format: date-time diff --git a/server.js b/server.js index 4896e62..726523d 100644 --- a/server.js +++ b/server.js @@ -6456,7 +6456,7 @@ function buildDocsPage() {

Training Materials

An Organisation's Training materials are links to its own training documents and videos, such as crib sheets in Google Docs, Word Online or SharePoint, or Loom videos. They appear on the Training materials page under Helpdesk. Makerble keeps the link, not the document. Each material is for the whole Organisation (all_organisation), or for one or more Teams (team_ids) and Workspaces (project_ids).

-

Anyone in the Organisation can list the materials they may see: those for everyone, for their Teams, and for Workspaces they have a role on. Organisation Admins and Makerble staff (System Access) see them all, add, change and remove them, and see review_due on any last reviewed more than 12 months ago. Someone with no part in the Organisation gets 403.

+

Anyone in the Organisation can list the materials they may see: those for everyone, for their Teams, and for Workspaces they have a role on. Organisation Admins and Makerble staff (System Access) see them all, add, change and remove them. Team Leaders and Project Editors add them, and change and remove the ones they own. Whoever may change a material sees review_due on it when it was last reviewed more than 12 months ago. Someone with no part in the Organisation gets 403.

${endpointCard("GET", "/organisations/{organisation_id}/training_materials", "List an Organisation's Training materials", true, [ @@ -6474,15 +6474,15 @@ function buildDocsPage() { { name: "organisation_id", in: "path", type: "integer", required: true, desc: "Organisation ID" } ], [ { code: "201", cls: "response-2xx", desc: "Training material added" }, - { code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the Organisation" }, + { code: "403", cls: "response-4xx", desc: "Not an Organisation Admin, Team Leader or Project Editor of the Organisation" }, { code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no name, a link not starting https://, or not linked to anyone" } - ], "Body: name, url (starting https://), description, material_type (document or video), all_organisation, team_ids, project_ids (at least one of the three), owner_id (an Organisation Admin; defaults to the user). Share the document with the same people, or they will see a request-access page.")} + ], "Body: name, url (starting https://), description, material_type (document or video), all_organisation, team_ids, project_ids (at least one of the three), owner_id (an Organisation Admin, Team Leader or Project Editor; defaults to the user). Share the document with the same people, or they will see a request-access page.")} ${endpointCard("PATCH", "/organisations/{organisation_id}/training_materials/{id}", "Change a Training material", true, [ { name: "organisation_id", in: "path", type: "integer", required: true, desc: "Organisation ID" }, { name: "id", in: "path", type: "integer", required: true, desc: "Training material ID" } ], [ { code: "200", cls: "response-2xx", desc: "Training material updated" }, - { code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the Organisation" }, + { code: "403", cls: "response-4xx", desc: "Not allowed to change it: not an Organisation Admin, nor a Team Leader or Project Editor who owns it" }, { code: "404", cls: "response-4xx", desc: "Not found" }, { code: "422", cls: "response-4xx", desc: "Validation failed" } ], "Only the fields sent change; team_ids and project_ids replace who it is linked to. Send mark_as_reviewed: true to set its last reviewed date to now.")} @@ -6491,7 +6491,7 @@ function buildDocsPage() { { name: "id", in: "path", type: "integer", required: true, desc: "Training material ID" } ], [ { code: "204", cls: "response-2xx", desc: "Removed from Makerble; the document itself is untouched" }, - { code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the Organisation" }, + { code: "403", cls: "response-4xx", desc: "Not allowed to remove it: not an Organisation Admin, nor a Team Leader or Project Editor who owns it" }, { code: "404", cls: "response-4xx", desc: "Not found" } ])}