Skip to content

[People · Phase 1] Group Admins, Capo Admins and Team members with Auth roles #143

Open
4 of 8 issues completed
Open

Description

@toto04

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 carry idp:* 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.
  • 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:link permission.
  • 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:

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

Activity

  1. added theissue type on Oct 29, 2026
  2. added
    peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)
    on Oct 29, 2026
  3. coderabbitai commented on Oct 29, 2026

    @coderabbitai
    Contributor
    🔗 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 plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 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:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions