Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6456,7 +6456,7 @@ function buildDocsPage() {
<h2 class="section-title">Training Materials</h2>
<div class="section-desc">
<p>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 (<code>all_organisation</code>), or for one or more Teams (<code>team_ids</code>) and Workspaces (<code>project_ids</code>).</p>
<p>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 <code>review_due</code> on any last reviewed more than 12 months ago. Someone with no part in the Organisation gets <code>403</code>.</p>
<p>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 <code>review_due</code> on it when it was last reviewed more than 12 months ago. Someone with no part in the Organisation gets <code>403</code>.</p>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/organisations/{organisation_id}/training_materials", "List an Organisation's Training materials", true, [
Expand All @@ -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: <code>name</code>, <code>url</code> (starting https://), <code>description</code>, <code>material_type</code> (<code>document</code> or <code>video</code>), <code>all_organisation</code>, <code>team_ids</code>, <code>project_ids</code> (at least one of the three), <code>owner_id</code> (an Organisation Admin; defaults to the user). Share the document with the same people, or they will see a request-access page.")}
], "Body: <code>name</code>, <code>url</code> (starting https://), <code>description</code>, <code>material_type</code> (<code>document</code> or <code>video</code>), <code>all_organisation</code>, <code>team_ids</code>, <code>project_ids</code> (at least one of the three), <code>owner_id</code> (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; <code>team_ids</code> and <code>project_ids</code> replace who it is linked to. Send <code>mark_as_reviewed: true</code> to set its last reviewed date to now.")}
Expand All @@ -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" }
])}
</div>
Expand Down
Loading