UI: Improve permission checks for collections #98

This commit is contained in:
Timo Volkmann 2021-10-21 15:03:18 +02:00
parent d8342d4546
commit 044490e6da
2 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@
<v-icon>edit</v-icon>
</v-btn>
<v-btn v-if="$config.feature('share')" icon class="action-share" :title="$gettext('Share')"
<v-btn v-if="$config.feature('share') && hasPermission(aclResources.ResourceAlbums, aclActions.ActionShare)" icon class="action-share" :title="$gettext('Share')"
@click.stop="dialog.share = true">
<v-icon>share</v-icon>
</v-btn>
@ -37,8 +37,8 @@
<v-icon>view_column</v-icon>
</v-btn>
<v-btn v-if="!$config.values.readonly && $config.feature('upload')" icon class="hidden-sm-and-down action-upload"
:title="$gettext('Upload')" @click.stop="showUpload()">
<v-btn v-if="!$config.values.readonly && $config.feature('upload') && hasPermission(aclResources.ResourcePhotos, aclActions.ActionUpload)"
icon class="hidden-sm-and-down action-upload" :title="$gettext('Upload')" @click.stop="showUpload()">
<v-icon>cloud_upload</v-icon>
</v-btn>
</v-toolbar>

View file

@ -184,7 +184,7 @@
</v-card>
</v-flex>
</v-layout>
<div v-if="staticFilter.type === 'album' && config.count.albums === 0" class="text-xs-center my-2">
<div v-if="staticFilter.type === 'album' && config.count.albums === 0 && hasPermission(aclResources.ResourceAlbums, aclActions.ActionCreate)" class="text-xs-center my-2">
<v-btn class="action-add" color="secondary" round @click.prevent="create">
<translate>Add Album</translate>
</v-btn>