Skip to content

Commit 4f07984

Browse files
committed
fixup! Hide some actions based on node permissions and share attributes
1 parent 12511bf commit 4f07984

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

apps/files_versions/src/components/Version.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</div>
4848
</template>
4949
<template #actions>
50-
<NcActionButton v-if="enableLabeling"
50+
<NcActionButton v-if="enableLabeling && hasUpdatePermissions"
5151
:close-after-click="true"
5252
@click="openVersionLabelModal">
5353
<template #icon>
@@ -63,23 +63,24 @@
6363
</template>
6464
{{ t('files_versions', 'Compare to current version') }}
6565
</NcActionButton>
66-
<NcActionButton v-if="!isCurrent"
66+
<NcActionButton v-if="!isCurrent && hasUpdatePermissions"
6767
:close-after-click="true"
6868
@click="restoreVersion">
6969
<template #icon>
7070
<BackupRestore :size="22" />
7171
</template>
7272
{{ t('files_versions', 'Restore version') }}
7373
</NcActionButton>
74-
<NcActionLink :href="downloadURL"
74+
<NcActionLink v-if="isDownloadable"
75+
:href="downloadURL"
7576
:close-after-click="true"
7677
:download="downloadURL">
7778
<template #icon>
7879
<Download :size="22" />
7980
</template>
8081
{{ t('files_versions', 'Download version') }}
8182
</NcActionLink>
82-
<NcActionButton v-if="!isCurrent && enableDeletion"
83+
<NcActionButton v-if="!isCurrent && enableDeletion && hasDeletePermissions"
8384
:close-after-click="true"
8485
@click="deleteVersion">
8586
<template #icon>

0 commit comments

Comments
 (0)