fix: authorize super admins by dynamic highest rank
Remote Build and Deploy / deploy (push) Successful in 42s
Remote Build and Deploy / deploy (push) Successful in 42s
This commit is contained in:
1 parent
bb847176ad
commit
f08e56cf53
10 files changed
+173
-65
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("authorization source contract", () => {
|
||||
it("contains no fixed numeric rank threshold in central authorization files", () => {
|
||||
for (const file of ["src/lib/permissions.ts", "src/lib/proxy-access.ts", "src/lib/admin/guard.ts"]) {
|
||||
const source = readFileSync(file, "utf8");
|
||||
expect(source, file).not.toMatch(/rank\s*[<>]=?\s*\d+/i);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user