fix(admin): restore sidebar categories via ACL grant repair
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
ce6e8235cc
commit
255c09b9fd
3 files changed
+94
-4
No files matched your search
@@ -31,4 +31,15 @@ describe("production ACL migration", () => {
|
||||
expect(seedSql).toContain("ap.slug = 'admin.dashboard'");
|
||||
expect(seedSql).toContain("ap.slug = 'mod.dashboard'");
|
||||
});
|
||||
|
||||
it("repairs full admin.* grants for ranks that already have dashboard", () => {
|
||||
const repairSql = readFileSync(
|
||||
resolve(migrationsDir, "0018_acl_repair_admin_nav_grants.sql"),
|
||||
"utf8",
|
||||
);
|
||||
expect(repairSql).toContain("admin.dashboard");
|
||||
expect(repairSql).toContain("ap.slug LIKE 'admin.%'");
|
||||
expect(repairSql).toContain("pr.id >= 6");
|
||||
expect(repairSql).toContain("pr.id >= 7");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user