Repository navigation
[People · Phase 1] Group Admins, Capo Admins and Team members with Auth roles #143
Copy link
Copy link
Open
Feature
4 / 84 of 8 issues completed
Copy link
Labels
peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)People: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)
Description
Goal
Board members and team Leads assign people to the association's semantic roles from the admin dashboard:
- Group Admin;
- Capo Admin;
- Team member / Lead.
Each person then receives the matching RBAC roles from PoliNetwork Auth automatically. For example, a Group Admin gets the admin role, which grants tg:messages:delete.
Rules
- Only predetermined roles. Auth only lets People hand out roles that are bound to a People meaning (
admin,capo,team:<key>:member,team:<key>:lead). A bound role can never carryidp:*permissions. - Clearance comes from RBAC and Auth checks it.
- Admin and team member:
admin:access+people:write, or being Lead of that team. - Lead and Capo Admin:
admin:access+people:appoint. - Nobody assigns themselves a role.
- Nobody hands out a role granting permissions they don't hold.
- Admin and team member:
- People without a linked account live only in the backend. Their assignments wait there, and nothing is created in Auth. We often don't know which account someone will sign in with (Entra ID if they're a socio, otherwise any Google account), and the email and name we have may not match it.
- Two ways to link, and nothing automatic:
- an email invite with a single-use link, accepted by signing in with any account;
- a manual link by someone with the new
people:linkpermission.
- Once linked, Auth holds the truth, and People shows what Auth holds. Role changes go to Auth as idempotent, all-or-nothing commands.
Flow
Create a person (manually or by CSV) ──► assignments pending in the backend
│
├─ email invite ──► invitee signs in with any account ──► confirms
└─ people:link holder links an account by hand
│
▼
backend sends role commands to Auth
(actor = whoever made each assignment, or whoever linked)
│
Auth checks the actor's clearance ──► roles applied, or refused with a reason shown on the record
Capo Admins managing their admins: later, but designed for
Capo Admins may later add and remove the admins under them. We're not building that now, but Phase 1 must not make it hard:
- Auth's delegation rules are one rule per binding kind ([People · Phase 1] Let People manage bound roles, without preliminary people (rework of #73) auth#78).
- The backend stores Capo of reference as a relation, and its pending-assignment checks mirror Auth's rules ([People · Phase 1] People records, assignments and role sync with Auth backend#101).
- The Capo Admin page is laid out so management could be added ([People · Phase 1] People pages: records, Admins, Capo Admins and Teams #139).
Sub-issues, in order
| # | Repo | Issue | Needs |
|---|---|---|---|
| 1 | auth | PoliNetworkOrg/auth#78: bound roles, rework of PoliNetworkOrg/auth#73 | — |
| 2 | auth | PoliNetworkOrg/auth#79: production IdP setup | 1 |
| 3 | backend | PoliNetworkOrg/backend#101: records, assignments, role sync | 2, cleanup PoliNetworkOrg/backend#100 |
| 4 | backend | PoliNetworkOrg/backend#102: email invite and manual link | 3 |
| 5 | backend | PoliNetworkOrg/backend#103: CSV bulk import | 3 |
| 6 | admin | #139: People pages | 3, cleanup #138 |
| 7 | admin | #140: Linking page and invite landing page | 4, 6 |
| 8 | admin | #141: bulk import wizard | 5, 6 |
Deploy order: Auth (PoliNetworkOrg/auth#78) → IdP setup (PoliNetworkOrg/auth#79) → backend → dashboard. Each backend piece deploys before the dashboard piece that uses it.
Permissions after Phase 1
| Permission | Allows |
|---|---|
people:self |
My area (and the Capo Admin page for a Capo Admin) |
people:read |
Overview, records, Admins, Teams, Linking (read) |
people:write |
Create and edit records, assign Admin and team members, send invites |
people:appoint |
Appoint and end Leads and Capo Admins |
people:link (new) |
Link and unlink an account by hand |
idp:people:bind (new, name to confirm) |
Bind a role to a People meaning in Auth |
Reacted by coderabbitai
Metadata
Metadata
Assignees
Labels
peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)People: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)
Activity
coderabbitai commentedon Oct 29, 2026
🔗 Related PRs
#132 - feat(people): show records filled from PoliNetwork Auth and Microsoft 365 [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!