Browse Source

fix(nc-gui): use preview permissions

pull/3807/head
braks 2 years ago
parent
commit
85b4570350
  1. 4
      packages/nc-gui/composables/useUIPermission/index.ts

4
packages/nc-gui/composables/useUIPermission/index.ts

@ -28,9 +28,7 @@ export const useUIPermission = createSharedComposable(() => {
const isUIAllowed = (permission: Permission | string, skipPreviewAs = false) => {
if (previewAs.value && !skipPreviewAs) {
const hasPreviewPermission = hasPermission(previewAs.value, true, permission)
if (hasPreviewPermission) return true
return hasPermission(previewAs.value, true, permission)
}
return Object.entries(allRoles.value).some(([role, hasRole]) =>

Loading…
Cancel
Save