feat(authz): role-based access control, teams and org/auth surfaces#274
Open
melihsunbul wants to merge 5 commits into
Open
feat(authz): role-based access control, teams and org/auth surfaces#274melihsunbul wants to merge 5 commits into
melihsunbul wants to merge 5 commits into
Conversation
Removed errorCallbackPath from mintMagicLinkUrl call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Role-based access control (RBAC): roles and permissions, team management, organisations/principals, and the supporting authentication surfaces. This adds the authorisation primitives that every later feature PR guards against.
Concepts
How it works
authz/(permission catalogue and enforcement),roles/(role and assignment services),teams/,organizations/,principals/, andserver/policy/(resolves the acting principal from the session)./api/v1/roles,/role-assignments,/permissions,/principals,/teams,/organizations(CRUD plus membership), withadmin-authz-routescoverage.authz,teams,principals,organizations,bootstrap,sso,recovery-codes,force-signout,auth-helpers,onboarding,status-sync.server/auth/email sign-in and contact linking (link-contact,widget-link-contact)./admin/settings/roles,/admin/settings/teams(and a team detail page),/admin/settings/people,/admin/users; thecomponents/admin/settings/team/controls; and shared admin controls (components/admin/shared/: principal/resource/organisation/contact/inbox/status pickers, scope selector, route error boundary) used across the admin surface.use-authz-queries, team query factories, shared team schemas.How to use
/admin/settings/roles) — create a role and tick the permissions it grants./admin/settings/teams) — create teams, add members, archive when no longer needed./api/v1/roles,/role-assignments,/teams,/organizations.Safety
Verification
bun run typecheck,bun run lint; unit tests for authz, teams, principals, recovery-codes, policy-actor resolution and the admin authz routes (included).📚 This is a stacked series — please review & merge in order
These 10 PRs are split by concern and ordered by dependency. Each is opened against
main, so until the PRs before it have merged, a PR's diff is cumulative (it also contains the earlier batches). As the earlier PRs merge and we rebase the next branch ontomain, each diff reduces to just its own batch. Merging all 10 in order reproduces our integrated branch exactly (verified: the cumulative tip of the series is byte-identical to it).Order (by branch):
01-data-model-foundation— data model, TypeIDs, migrations02-rbac-authz-teams— RBAC, teams, organisation & auth surfaces03-events-audit-webhooks— event dispatch, audit log, webhooks, notifications04-ticketing-crm-core— ticketing / CRM core05-sla-inboxes-routing— SLA policies, inboxes, business hours, routing06-github-sync-and-ticket-email— GitHub ticket sync, ticket email, integration platform07-widget-profiles— scoped widget profiles + ticket submission08-api-openapi-mcp— OpenAPI surface, MCP tools, conversation actions, API keys09-content-visibility— changelog/help-centre visibility, segments, portal tabs10-test-coverage— broad unit/integration test suite + supporting infraPart of the roadmap: #283