diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-04-29 17:43:39 +0300 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2020-05-04 14:48:11 +0300 |
commit | ff20da637e2d7f46c8acc04fdd7e4329b70df098 (patch) | |
tree | 5200f600295c1648ce91679efe50ac21627fa527 /apps/files_sharing/src/components/SharingEntryLink.vue | |
parent | a93d182bac88707002b70d2dcc881b2a1020b749 (diff) |
Fix federated link sharing permissions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index e1722420a49..912825b35d6 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -126,21 +126,21 @@ <template v-if="share.canEdit"> <!-- folder --> <template v-if="isFolder && fileHasCreatePermission && config.isPublicUploadEnabled"> - <ActionRadio :checked="share.permissions === publicUploadRValue" + <ActionRadio :checked="sharePermissions === publicUploadRValue" :value="publicUploadRValue" :name="randomId" :disabled="saving" @change="togglePermissions"> {{ t('files_sharing', 'Read only') }} </ActionRadio> - <ActionRadio :checked="share.permissions === publicUploadRWValue" + <ActionRadio :checked="sharePermissions === publicUploadRWValue" :value="publicUploadRWValue" :disabled="saving" :name="randomId" @change="togglePermissions"> {{ t('files_sharing', 'Allow upload and editing') }} </ActionRadio> - <ActionRadio :checked="share.permissions === publicUploadWValue" + <ActionRadio :checked="sharePermissions === publicUploadWValue" :value="publicUploadWValue" :disabled="saving" :name="randomId" @@ -359,6 +359,15 @@ export default { computed: { /** + * Return the current share permissions + * We always ignore the SHARE permission as this is used for the + * federated sharing. + * @returns {number} + */ + sharePermissions() { + return this.share.permissions & ~OC.PERMISSION_SHARE + }, + /** * Generate a unique random id for this SharingEntryLink only * This allows ActionRadios to have the same name prop * but not to impact others SharingEntryLink |