mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 18:55:22 +00:00
refactor(permission-system): simplify policy and autoreview flow
This commit is contained in:
@@ -84,7 +84,7 @@ describe("findCompiledWildcardMatch", () => {
|
||||
expect(findCompiledWildcardMatch(patterns, "npm install")).toBeNull();
|
||||
});
|
||||
|
||||
test("last-match-wins precedence: later pattern overrides earlier", () => {
|
||||
test("the low-level compiled matcher returns the last matching entry", () => {
|
||||
const patterns = compileWildcardPatternEntries([
|
||||
["git *", "allow"],
|
||||
["git push *", "deny"],
|
||||
@@ -95,7 +95,7 @@ describe("findCompiledWildcardMatch", () => {
|
||||
expect(result?.matchedPattern).toBe("git push *");
|
||||
});
|
||||
|
||||
test("last-match-wins: specific deny before broad allow matches the later one", () => {
|
||||
test("the low-level matcher does not apply permission-rule specificity", () => {
|
||||
const patterns = compileWildcardPatternEntries([
|
||||
["*", "deny"],
|
||||
["git status", "allow"],
|
||||
|
||||
Reference in New Issue
Block a user