Skip to content

Commit b4f4db4

Browse files
coopernetesclaude
andcommitted
fix: align RepoPermission default matchType to GLOB
The YAML config path already defaulted to GLOB when type is omitted. The Java model still defaulted to LITERAL, meaning permissions created via the REST API without an explicit matchType got different behaviour than permissions loaded from config. Unified to GLOB everywhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 618d083 commit b4f4db4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

git-proxy-java-core/src/main/java/org/finos/gitproxy/permission/RepoPermission.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* {@link #value} at {@link #provider}.
1414
*
1515
* <p>{@link #target} selects which part of the repo URL is compared (default {@link MatchTarget#SLUG});
16-
* {@link #matchType} controls how {@link #value} is interpreted: {@code LITERAL} for exact equality, {@code GLOB} for
17-
* {@code *}/{@code ?} wildcards, {@code REGEX} for full Java regex.
16+
* {@link #matchType} controls how {@link #value} is interpreted: {@code GLOB} for {@code *}/{@code ?} wildcards
17+
* (default), {@code LITERAL} for exact equality, {@code REGEX} for full Java regex.
1818
*/
1919
@Data
2020
@Builder
@@ -35,9 +35,9 @@ public class RepoPermission {
3535
/** Pattern to match against the {@link #target} portion of the URL. */
3636
private String value;
3737

38-
/** How {@link #value} is interpreted when matching. Defaults to {@link MatchType#LITERAL}. */
38+
/** How {@link #value} is interpreted when matching. Defaults to {@link MatchType#GLOB}. */
3939
@Builder.Default
40-
private MatchType matchType = MatchType.LITERAL;
40+
private MatchType matchType = MatchType.GLOB;
4141

4242
@Builder.Default
4343
private Operations operations = Operations.PUSH;

0 commit comments

Comments
 (0)