feat: unified (target, matchType, value) match shape for rules and permissions#227
Merged
Conversation
…rmissions
Replaces the old `slug/owner/name` fields on AccessRule and `path/pathType`
on RepoPermission with a single `match:` block shared by both. Config shape
is now identical across URL rules and permissions:
match:
target: SLUG | OWNER | NAME
value: <pattern>
type: LITERAL | GLOB | REGEX # optional — defaults to GLOB for rules,
# LITERAL for permissions
New MatchTarget and MatchType enums carry the match semantics. The SQL column
for the pattern is named `match_value` (V5 migration) to avoid the H2 reserved
keyword `value`. All YAML config files, Docker fixtures, docs, tests, and
migration SQL are updated.
closes #221
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removing the asymmetry where permissions defaulted to LITERAL and rules to GLOB. A single universal default (GLOB) is simpler: operators don't have to remember which context they're in, and the practical risk is negligible — a permission value with no wildcard chars behaves identically under GLOB and LITERAL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Aligns the UI default with the backend: omitting type now means GLOB in both the YAML config and the dashboard add forms. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Inline rule snippets still used the old slugs:/operations:[list] shape, causing GestaltException on reload. Updated to match: block with BOTH/PUSH. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Closes #221
slug/owner/namefields onAccessRuleandpath/pathTypeonRepoPermissionwith a singlematch:block (newMatchTarget+MatchTypeenums) shared by both rules and permissionsmatch_valueto avoid H2 reserved keywordtypeis optional in config — defaults toGLOBfor both rules and permissions (uniform default, no context-switching)Config shape is now consistent across rules and permissions:
Test plan
./gradlew test --rerunpasses (all unit + integration tests)ConfigHotReloadE2ETestfailures unrelated to this change)JettyConfigurationBuilderTestcovers null-type default (GLOB) for both rules and permissions