Skip to content
Snippets Groups Projects
Unverified Commit c7928dd2 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

#15368 Repro: Click behavior leading to the dashboard without permissions...

#15368 Repro: Click behavior leading to the dashboard without permissions causes a permission error (#15371)
parent 3d1ee1c6
Branches jest-role-hidden
Tags
No related merge requests found
......@@ -602,6 +602,58 @@ describe("scenarios > dashboard", () => {
});
});
});
it.skip("should be possible to visit a dashboard with click-behavior linked to the dashboard without permissions (metabase#15368)", () => {
cy.request("GET", "/api/user/current").then(
({ body: { personal_collection_id } }) => {
// Save new dashboard in admin's personal collection
cy.request("POST", "/api/dashboard", {
name: "15368D",
collection_id: personal_collection_id,
}).then(({ body: { id: NEW_DASHBOARD_ID } }) => {
const COLUMN_REF = `["ref",["field-id",${ORDERS.ID}]]`;
// Add click behavior to the existing "Orders in a dashboard" dashboard
cy.request("PUT", "/api/dashboard/1/cards", {
cards: [
{
id: 1,
card_id: 1,
row: 0,
col: 0,
sizeX: 12,
sizeY: 8,
series: [],
visualization_settings: {
column_settings: {
[COLUMN_REF]: {
click_behavior: {
type: "link",
linkType: "dashboard",
parameterMapping: {},
targetId: NEW_DASHBOARD_ID,
},
},
},
},
parameter_mappings: [],
},
],
});
cy.server();
cy.route("GET", `/api/dashboard/${NEW_DASHBOARD_ID}`).as(
"loadDashboard",
);
});
},
);
cy.signInAsNormalUser();
cy.visit("/dashboard/1");
cy.wait("@loadDashboard");
cy.findByText("Orders in a dashboard");
cy.contains("37.65");
});
});
function checkOptionsForFilter(filter) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment