fix(state-mappings): internal admin does not unlock can_manage_users in catalog#2872
Open
ravverma wants to merge 1 commit into
Open
fix(state-mappings): internal admin does not unlock can_manage_users in catalog#2872ravverma wants to merge 1 commit into
ravverma wants to merge 1 commit into
Conversation
…in catalog Coherence follow-up to the internal-admin write block: GET /product/capabilities gated the full catalog (incl. can_manage_users) on callerHasFacsManageUsers, which counts the internal-admin bypass. Since internal admins can no longer author bindings, being an admin must not surface can_manage_users as assignable either. Add callerHoldsFacsManageUsersClaim (FACS claim only, no admin bypass) and use it for the catalog gate; admins now get the catalog minus can_manage_users. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Coherence follow-up to #2871 (block internal admins from write mutations).
GET /product/capabilitiesnow returns the catalog minuscan_manage_usersfor an internal admin who does not hold the FACScan_manage_usersclaim.Why
The assignable-catalog gate used
callerHasFacsManageUsers, which counts the internal-admin bypass (isAdmin() || hasFacsPermission(...)). Since internal admins can no longer author bindings (#2871), surfacingcan_manage_usersas assignable to them is misleading. Only a real FACScan_manage_usersclaim should unlock it.How
callerHoldsFacsManageUsersClaim(ctx, product)— FACS claim only, no admin bypass.getProductCapabilitiesuses it for the full-catalog gate.resolveManageAuthority(reads) is unchanged; admin reads stay allowed.Tests
Added: internal admin (no FACS claim) gets the catalog minus
can_manage_users. Existing FACS-manager / non-manager catalog tests unchanged. 21 passing; lint clean.🤖 Generated with Claude Code