Skip to content
Snippets Groups Projects
Commit 48c59591 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Disabled actions menu to anonymous users

parent 9913e0bb
No related branches found
No related tags found
No related merge requests found
Pipeline #2128 passed
......@@ -9,7 +9,7 @@
<div class="mb-3">
<b-button variant="success" class="mr-2" :disabled="!writable" v-b-modal.create-folder-modal>New folder</b-button>
<b-button variant="success" class="mr-2" :disabled="!writable" v-b-modal.upload-files-modal>Upload files</b-button>
<b-dropdown variant="primary" text="Actions" v-if="asyncButtonEnabled || deleteButtonEnabled || archiveButtonEnabled">
<b-dropdown variant="primary" text="Actions" v-if="actionsEnabled">
<b-dropdown-item :disabled="!asyncButtonEnabled" @click="startAsyncRecallJob">Async recall</b-dropdown-item>
<b-dropdown-item :disabled="!deleteButtonEnabled" @click="deleteNodes">Delete</b-dropdown-item>
<b-dropdown-item :disabled="!archiveButtonEnabled" @click="createArchive('zip')">Create zip archive</b-dropdown-item>
......@@ -88,6 +88,10 @@ export default {
}
return items;
},
actionsEnabled() {
return this.$store.state.user !== 'anonymous' &&
(this.asyncButtonEnabled || this.deleteButtonEnabled || this.archiveButtonEnabled);
},
asyncButtonEnabled() {
return this.$store.state.asyncButtonEnabled;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment