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

Repro #20436:Restricting and unrestricting access to a table results in the...

Repro #20436:Restricting and unrestricting access to a table results in the DB-level permission still being "Granular" #20504
parent f94d5149
Branches
Tags embedding-sdk-0.1.29
No related merge requests found
import { restore, popover } from "__support__/e2e/cypress";
import { USER_GROUPS } from "__support__/e2e/cypress_data";
const { ALL_USERS_GROUP } = USER_GROUPS;
const url = `/admin/permissions/data/group/${ALL_USERS_GROUP}`;
describe.skip("issue 20436", () => {
beforeEach(() => {
cy.intercept("PUT", "/api/permissions/graph").as("updatePermissions");
restore();
cy.signInAsAdmin();
cy.updatePermissionsGraph({
[ALL_USERS_GROUP]: {
1: { schemas: "all", native: "none" },
},
});
});
it("should display correct permissions on the database level after changes on the table level (metabase#20436)", () => {
cy.visit(url);
cy.findByText("Unrestricted");
// Go the the view where we can change permissions for individual tables
cy.findByText("Sample Database").click();
// Change the permission levels for ANY of the tables - it doesn't matter which one
changePermissions("Unrestricted", "No self-service");
cy.button("Change").click();
saveChanges();
cy.wait("@updatePermissions");
// Now turn it back to the "Unrestricted" access
changePermissions("No self-service", "Unrestricted");
saveChanges();
cy.wait("@updatePermissions");
cy.visit(url);
cy.findByText("Unrestricted");
});
});
function changePermissions(from, to) {
cy.findAllByText(from)
.first()
.click();
popover()
.contains(to)
.click();
}
function saveChanges() {
cy.button("Save changes").click();
cy.button("Yes").click();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment