feat: manage material visibility and shares

The management save/update body takes is_private, author_user_id and
share_user_ids (absent keeps each; a new material gets the caller as
author), and the managed material shows them. New routes PATCH
/materials/{id}/visibility, PUT /materials/{id}/shares and GET /users,
with the MCP tools bm_manage_set_material_visibility,
bm_manage_set_material_shares and bm_manage_list_users. The /bmadmin
form gets the private switch, the author picker and shared_with.
This commit is contained in:
Jakub Zych
2026-11-08 11:56:14 +01:00
parent 418f8240a4
commit 3346cb6ff6
13 changed files with 470 additions and 53 deletions

View File

@@ -166,6 +166,9 @@ func TestRoutes(t *testing.T) {
"POST /api/v1/bm/materials/{id}/files/inline",
"POST /api/v1/bm/materials/{id}/files/upload-url",
"DELETE /api/v1/bm/materials/{id}/files/{file}",
"PATCH /api/v1/bm/materials/{id}/visibility",
"PUT /api/v1/bm/materials/{id}/shares",
"GET /api/v1/bm/users",
"GET /api/v1/bm/courses",
"GET /api/v1/bm/courses/{id}",
"POST /api/v1/bm/courses",