Repository navigation
feat(roles): manage roles, permissions, mappings and organization roles - #341
Merged
Merged
Conversation
Add a Roles page for the permission catalogue, the organization role catalogue, and what each instance and organization role grants. Writes ask for step-up, refusals name what stood in the way, and an API older than v0.23 gets an upgrade message rather than retries. Organization member roles now come from the catalogue, keeping a legacy role a member already holds. Bump @seamless-auth/types to 0.38 and categorize the new audit events. Closes #297
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
Adds
/roles(Roles in the sidebar), which makes the v0.23 access model manageable in the console:available_roles, and the page links to System configuration.adminand an organizationadminnever share a grant. The mapping dialog repeats the second point for the role being edited.Organization members:
Supporting changes:
@seamless-auth/types0.34 to 0.38, with fixtures updated foroidc_cli_client_idandsessionExchangeEnabled.session_exchange*goes under Session Tokens.ApiError.detailscarries the API'sdetails.Tablerow actions take an optionalhidden.useRolestakesenabled.Before this works behind a server adapter
seamless-auth-server's bundled manifest comes from API 0.21.0 and does not list these routes. A standalone console behind that adapter will show the "needs v0.23" state even on API v0.23, until the manifest is synced and released. The message mentions the adapter for this reason.What was run
npm run lint,npm run typecheck,npm run format:check,npm run build: passnpm test: 108 files, 803 tests passnpm run test:e2e: 203 pass, against the repo's mocked backend, including the newe2e/tests/roles.spec.tsnpm run check:types-current: passIn a browser (Chromium through Playwright), against the API worktree for #576 and #577 on a scratch Postgres:
Legacy Role, whose name has a space.Legacy Role. The database row kept it.step_up_requiredto the same write sent directly.What was not run
admin:write, which the admin route requires, passes that check, so it is only covered by mocks.Noticed, not changed
useUpdateSystemConfigdoes not invalidate["roles"].handleRemoveMemberinOrganizations.tsxhas nocanWriteguard, andhandleAddMemberchecks it twice.sessionExchangeEnabledoroidc_cli_client_id, both new in the types.Closes #297