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}">-->
<v-btn
v-if="_isUIAllowed('add-user')"
outlined
class="nc-btn-share-view caption px-2 nc-remove-border font-weight-medium"
small

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

@ -207,9 +207,10 @@ export function _viewMenu(roleType, previewMode) {
// mainPage.shareView().should(validationString);
// mainPage.automations().should(validationString);
// fix me! disabled for now
// cy.get('.nc-btn-share-view').should(validationString);
// share view permissions are role specific
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.getActiveMenu().find('[role="menuitem"]').should("have.length", actionsMenuItemsCnt);
}

Loading…
Cancel
Save