mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
refactor(permission-system): simplify policy and autoreview flow
This commit is contained in:
@@ -3,7 +3,6 @@ import { describe, expect, test } from "vitest";
|
||||
import {
|
||||
PATH_BEARING_TOOLS,
|
||||
PATH_SURFACES,
|
||||
READ_ONLY_PATH_BEARING_TOOLS,
|
||||
} from "#src/access-intent/path-surfaces";
|
||||
|
||||
describe("PATH_BEARING_TOOLS", () => {
|
||||
@@ -19,21 +18,9 @@ describe("PATH_BEARING_TOOLS", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("READ_ONLY_PATH_BEARING_TOOLS", () => {
|
||||
test("contains read, find, grep, ls", () => {
|
||||
for (const tool of ["read", "find", "grep", "ls"]) {
|
||||
expect(READ_ONLY_PATH_BEARING_TOOLS.has(tool)).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
test("does not contain write or edit", () => {
|
||||
expect(READ_ONLY_PATH_BEARING_TOOLS.has("write")).toBe(false);
|
||||
expect(READ_ONLY_PATH_BEARING_TOOLS.has("edit")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("PATH_SURFACES", () => {
|
||||
test("contains the path-bearing tools plus the cross-cutting gates", () => {
|
||||
test("contains the path-bearing tools plus the path gate", () => {
|
||||
for (const surface of [
|
||||
"read",
|
||||
"write",
|
||||
@@ -41,7 +28,6 @@ describe("PATH_SURFACES", () => {
|
||||
"find",
|
||||
"grep",
|
||||
"ls",
|
||||
"external_directory",
|
||||
"path",
|
||||
]) {
|
||||
expect(PATH_SURFACES.has(surface)).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user