Repository navigation
fix(permissions): bound delegated global permission edits by platform-level access - #828
Merged
Merged
Conversation
…-level access Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…ial requires a permission; flatten test ternaries Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Deploying simple-module-python with
|
| Latest commit: |
4439f80
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2203a892.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-s02-permission-ceiling.simple-module-python.pages.dev |
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. |
…iling # Conflicts: # CHANGELOG.md
…iling # Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
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.
Hardening for delegated permission editing.
User and role permission grants are global, so the access that bounds a delegated editor (an actor with
permissions.managewho is not an unscoped admin) is now computed from platform-level authority only: global roles, direct grants and grant sources, without the synthetictenant:*roles of the active tenant. API-token scope caps still apply; unscoped platform admins are unchanged.simple_module_hosting.permissions.resolve_principal_permissions(..., include_tenant_roles=False)resolves that set (tenant roles are filtered from the role list, as the tenants/api_tokens resolvers do). Credential validity (required_permission) stays tenant-aware.permissions.write_safety.check_permission_writerequires platform-levelpermissions.manageand uses the platform set for both the "assign only what you hold" and "target within reach" checks; an unauthenticated request is refused before any grant source runs.permissions.manageonly through a tenant role can no longer edit global grants. Docs (docs/framework/permissions.md,docs/modules/permissions.md) and CHANGELOG (Unreleased → Security) updated.Pipeline: /optimize (1 commit), two review passes (correctness + maintainability), triage kept locally.
Local CI:
make lint✓ ·make test-js✓ ·make test-py(8 workers) 7886 passed, 1 failed:test_clean_target_is_not_in_repo, the known local/tmp/.gitplaceholder failure; it passes when re-run alone.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4