fix: derive config site from key and let site wildcards govern site config#295
Merged
Conversation
…onfig
Two fixes for site config permissions:
- configPermissionPath derived the site from daCtx.site, which is undefined for
a bare /config/{org}/{site} request (the site is parsed as the filename). It
now derives the site from daCtx.key, matching getAclCtx, so the route and the
authorized gate agree.
- A site-scoped content wildcard (/{site}/** or /{site}/+**), not just an exact
/{site}/CONFIG rule, now activates the per-site /{site}/CONFIG keyword. Root
wildcards (/**, /+**) remain non-activating so they do not suppress the org
CONFIG fallback. Path matching is factored into pathMatchesTarget and shared.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion)
Replace the site-config activation/fallback scan with a simpler union: config
access is granted if the user matches the resource's own keyword (per-site
/{site}/CONFIG, incl. site wildcards, or CONFIG for org config) OR the org-level
CONFIG keyword. Org admins can always manage any site's config; site rules only
add access, never restrict it.
Removes resolveConfigKey and the whole-sheet scan; configPermissionPath becomes
a trivial site->keyword mapping and the union OR lives in the config route.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
mhaack
approved these changes
Jun 17, 2026
adobe-bot
pushed a commit
that referenced
this pull request
Jun 17, 2026
## [1.11.1](v1.11.0...v1.11.1) (2026-06-17) ### Bug Fixes * derive config site from key and let site wildcards govern site config ([#295](#295)) ([fd355f3](fd355f3))
Collaborator
|
🎉 This PR is included in version 1.11.1 🎉 The release is available on:
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.
Description
Two fixes for site config permissions:
configPermissionPath derived the site from daCtx.site, which is undefined for a bare /config/{org}/{site} request (the site is parsed as the filename). It now derives the site from daCtx.key, matching getAclCtx, so the route and the authorized gate agree.
A site-scoped content wildcard (
/{site}/**or/{site}/+**), not just an exact /{site}/CONFIG rule, now activates the per-site /{site}/CONFIG keyword. Root wildcards (/**,/+**) remain non-activating so they do not suppress the org CONFIG fallback. Path matching is factored into pathMatchesTarget and shared.How Has This Been Tested?
Types of changes
Checklist: