Browse Source

fix: hide share view for non-previlaged users

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/962/head
Raju Udava 3 years ago
parent
commit
8cdaa786c4
  1. 1
      packages/nc-gui/components/project/spreadsheet/components/shareViewMenu.vue
  2. 5
      scripts/cypress/integration/spec/roleValidation.spec.js

1
packages/nc-gui/components/project/spreadsheet/components/shareViewMenu.vue

@ -7,6 +7,7 @@
> >
<template #activator="{on}">--> <template #activator="{on}">-->
<v-btn <v-btn
v-if="_isUIAllowed('add-user')"
outlined outlined
class="nc-btn-share-view caption px-2 nc-remove-border font-weight-medium" class="nc-btn-share-view caption px-2 nc-remove-border font-weight-medium"
small small

5
scripts/cypress/integration/spec/roleValidation.spec.js

@ -207,9 +207,10 @@ export function _viewMenu(roleType, previewMode) {
// mainPage.shareView().should(validationString); // mainPage.shareView().should(validationString);
// mainPage.automations().should(validationString); // mainPage.automations().should(validationString);
// fix me! disabled for now // share view permissions are role specific
// cy.get('.nc-btn-share-view').should(validationString); cy.get('.nc-btn-share-view').should(validationString);
// actions menu (more), only download csv should be visible for non-previlaged users
cy.get('.nc-actions-menu-btn').click(); cy.get('.nc-actions-menu-btn').click();
cy.getActiveMenu().find('[role="menuitem"]').should("have.length", actionsMenuItemsCnt); cy.getActiveMenu().find('[role="menuitem"]').should("have.length", actionsMenuItemsCnt);
} }

Loading…
Cancel
Save