feat(collections): per-member permission roles on shared lists (#1081)

The owner now assigns each member a role — viewer (read + copy-to-trip only),
editor (default: add + edit places) or admin (full incl. delete). The owner is
always full. Existing members default to editor via migration 152, so nothing
regresses.

- Server: role column on collection_members (migration 152 + schema); roleOf +
  assertCanEdit (save/update/status/list-meta) + assertCanDelete (delete) layered
  on assertAccess; sendInvite takes a role; new setMemberRole (owner-only) +
  POST members/role; members payload carries each role.
- Client: Share modal gains a role picker on invite and a per-member role select
  for the owner (read-only role badge for others); the page hides add / edit /
  status / move / delete for roles that can't perform them (server still enforces).
- Roles in all 22 locales; service + controller tests for the new gating.
This commit is contained in:
Maurice
2026-07-01 17:11:16 +02:00
committed by Maurice
parent f2972481fe
commit 1e0feb93dd
35 changed files with 263 additions and 40 deletions
+4
View File
@@ -1,6 +1,10 @@
import type { TranslationStrings } from '../types';
const collection: TranslationStrings = {
'collections.role.label': 'Роль',
'collections.role.viewer': 'Глядач',
'collections.role.editor': 'Редактор',
'collections.role.admin': 'Адмін',
'collections.picker.allLists': 'Усі списки',
'collections.select': 'Вибрати',
'collections.selectAll': 'Вибрати все',