Project team: editable member roles + new 'Admin' role inheritable down the project tree #48
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Trigger
m 2026-05-20 13:33:
Current state (verified 2026-05-20)
paliad.project_teams.responsibilityis the team-level role on a project. CHECK constraint:('lead', 'member', 'observer', 'external')(mig 059).paliad.users.professionis the firm-level tier (partner / of_counsel / associate / senior_pa / pa / paralegal) — orthogonal to responsibility.frontend/src/projects-detail.tsx+frontend/src/client/projects-detail.ts). Add/remove members exists; editing an existing member's responsibility does not appear in the UI today.docs//migrations around059_profession_vs_responsibility.up.sqlfor the rationale.What m wants
1. Editable team-member roles
/projects/{id}Team section), a user with appropriate authority can change another member's responsibility (e.g. promote a member to lead, demote a lead to member, etc.).2. New project-role 'Admin'
'admin'to theresponsibilityCHECK constraint (or to a separate per-project role column — design call).paliad.approval_policiesper project + the profession ladder.Design considerations
effective_project_admin(user_id, project_id)that returns true iff the user isresponsibility='admin'on this project OR any ancestor in the ltree path. Reuse the existing path-walk used bycan_see_project.paliad.project_teamsfor editing roles: caller must beeffective_project_adminORglobal_admin.project_team_member_role_changedevent (project_events) per existing audit convention.<select>per row in the team table for users with edit authority, read-only for everyone else. Save-on-change with toast feedback. Confirm modal only on demote-from-Admin or remove-self.Acceptance
responsibilityCHECK allows'admin'(or schema chosen alternative).effective_project_admin(user_id, project_id)returns true for the user on the project AND every descendant.effective_project_admincan change other members' responsibilities in the team UI.project_team_member_role_changed.Out of scope
global_admin).Role recommendation
inventor → coder — small but with RLS implications + inheritance design. 3-4 questions for m to batch: (a) admin-as-responsibility vs admin-as-separate-column, (b) admin overrides approval gate yes/no (inventor recommends no), (c) UI shape inline-select vs dropdown-modal, (d) safeguard against last-admin removal.
Shipped via gauss on
mai/gauss/inventorcoder-team-admin— merged into main; commit https://mgit.msbls.de/m/paliad/commit/111c7c3. Live after next Dokploy deploy. (m/paliad#49 Add User slice still parked pending m's credential go-ahead.)