Skip to content

Commit

Permalink
Hide new public link share button if user lacks permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed May 19, 2021
1 parent 4bf7899 commit 5701b4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions changelog/unreleased/bugfix-hide-new-link-button
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Hide "Create new public link" button

The button to create new public links was visible even if the user lacked
the permissions to create one. It is now being hidden unless the user is
allowed to create a share of the respective file.

https://github.com/owncloud/web/pull/5126
6 changes: 5 additions & 1 deletion packages/web-app-files/src/components/FileLinkSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</translate>
</i>
</div>
<div class="oc-mt-s oc-mb-s">
<div v-if="canSeePublicLinks" class="oc-mt-s oc-mb-s">
<oc-button
id="files-file-link-add"
icon="add"
Expand Down Expand Up @@ -110,6 +110,10 @@ export default {
return 'uk-animation-slide-right-medium uk-animation-reverse'
},
canSeePublicLinks() {
return this.highlightedFile.canShare()
},
linksLoading() {
return this.currentFileOutgoingSharesLoading || this.sharesTreeLoading
},
Expand Down

0 comments on commit 5701b4a

Please sign in to comment.