feat(users): reserve the tenant: role namespace, pin tenant-role isolation (#377) [stack 2/11] - #386
Merged
Merged
Conversation
…permission isolation (#377) Claude-Session: https://claude.ai/code/session_01F8RiTBUJQnZmSq56qReZeV
Deploying simple-module-python with
|
| Latest commit: |
bf58c98
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b1832cec.simple-module-python.pages.dev |
| Branch Preview URL: | https://tenancy-02-permissions.simple-module-python.pages.dev |
antosubash
added this pull request to stack #397
October 1, 2026 16:14
antosubash
marked this pull request as ready for review
October 1, 2026 16:15
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Closes #377. Stack 2/11 of the tenancy-adoption series (base: #385).
What
resolved_permissions_formerges the registry'stenant:*mappings with the user's own roles. So this PR adds a guard and pins the behaviour in tests rather than changing logic.@validates("name")onusers.Rolerejects any role name that starts withtenant:(case-insensitive). No API creates or renames roles; they come only from bootstrap and seeds. Putting the guard on the model therefore covers every path.modules/tenants/tests/test_tenant_role_permissions.py):tenant:*roles hold no*and no platform permissions.sync_admin_all_permissionsnever touchestenant:*.Tests
make test-py: 3333 passed.make lintis clean.https://claude.ai/code/session_01F8RiTBUJQnZmSq56qReZeV