fix: if and only if org member should be able to deploy fix at edge#1844
Merged
fix: if and only if org member should be able to deploy fix at edge#1844
Conversation
|
This PR will trigger a patch release when merged. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
vivesing
reviewed
Feb 24, 2026
vivesing
approved these changes
Feb 24, 2026
solaris007
pushed a commit
that referenced
this pull request
Feb 25, 2026
## [1.322.2](v1.322.1...v1.322.2) (2026-02-25) ### Bug Fixes * if and only if org member should be able to deploy fix at edge ([#1844](#1844)) ([67dcb8d](67dcb8d))
Member
|
🎉 This PR is included in version 1.322.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Restricts edge deployment and config updates to organization members only. Previously, any user passing
hasAccess()(including admins with cross-org access) could deploy/rollback fixes or update edge config. Now,isOwnerOfSite()enforces strict org membership — admins are not exempted.AccessControlUtil.isOwnerOfSite(entity)— returnstrueonly if the user belongs to the entity's organization. No admin bypass.deploySuggestionToEdgeandrollbackSuggestionFromEdgeinsuggestions.js, andcreateOrUpdateEdgeConfiginllmo.js— returns 403 if the check fails.Files Changed
src/support/access-control-util.jsisOwnerOfSite()methodsrc/controllers/suggestions.jssrc/controllers/llmo/llmo.jscreateOrUpdateEdgeConfigtest/support/access-control-util.test.jsisOwnerOfSitebranchestest/controllers/suggestions.test.jsbeforeEachblocks + 2 forbidden-path teststest/controllers/llmo/llmo.test.jsisOwnerOfSiteadded to mocks + forbidden-path test forcreateOrUpdateEdgeConfigTest Plan
isOwnerOfSite— missing entity, Site with/without org access, missing org, Organization with/without org access, unknown entityisOwnerOfSiteis falseisOwnerOfSiteis falsecreateOrUpdateEdgeConfigreturns 403 whenisOwnerOfSiteis false