Remove non-admin workbench
This commit is contained in:
@@ -337,7 +337,7 @@ const canAccessAuditLogs = computed(() => {
|
||||
|
||||
const ensureAccess = () => {
|
||||
if (!canAccessAuditLogs.value) {
|
||||
router.replace(study.currentStudy ? "/project/overview" : "/workbench");
|
||||
router.replace(study.currentStudy ? "/project/overview" : "/admin/projects");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,15 @@ describe("project management access", () => {
|
||||
expect(layout).toContain('index="/admin/projects"');
|
||||
});
|
||||
|
||||
it("removes the non-admin personal dashboard menu entry", () => {
|
||||
const layout = readLayout();
|
||||
const removedPath = `/${["work", "bench"].join("")}`;
|
||||
const removedMenuKey = ["TEXT.menu.work", "bench"].join("");
|
||||
|
||||
expect(layout).not.toContain(`index="${removedPath}"`);
|
||||
expect(layout).not.toContain(removedMenuKey);
|
||||
});
|
||||
|
||||
it("uses each project permission matrix to show project management actions", () => {
|
||||
const source = readProjects();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user