Skip to content

Commit 5d0ffce

Browse files
committed
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>
1 parent a93d182 commit 5d0ffce

File tree

7 files changed

+8496
-63
lines changed

7 files changed

+8496
-63
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 71 additions & 60 deletions
Large diffs are not rendered by default.

apps/files_sharing/src/components/SharingEntryLink.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,21 @@
126126
<template v-if="share.canEdit">
127127
<!-- folder -->
128128
<template v-if="isFolder && fileHasCreatePermission && config.isPublicUploadEnabled">
129-
<ActionRadio :checked="share.permissions === publicUploadRValue"
129+
<ActionRadio :checked="sharePermissions === publicUploadRValue"
130130
:value="publicUploadRValue"
131131
:name="randomId"
132132
:disabled="saving"
133133
@change="togglePermissions">
134134
{{ t('files_sharing', 'Read only') }}
135135
</ActionRadio>
136-
<ActionRadio :checked="share.permissions === publicUploadRWValue"
136+
<ActionRadio :checked="sharePermissions === publicUploadRWValue"
137137
:value="publicUploadRWValue"
138138
:disabled="saving"
139139
:name="randomId"
140140
@change="togglePermissions">
141141
{{ t('files_sharing', 'Allow upload and editing') }}
142142
</ActionRadio>
143-
<ActionRadio :checked="share.permissions === publicUploadWValue"
143+
<ActionRadio :checked="sharePermissions === publicUploadWValue"
144144
:value="publicUploadWValue"
145145
:disabled="saving"
146146
:name="randomId"
@@ -358,6 +358,15 @@ export default {
358358
},
359359
360360
computed: {
361+
/**
362+
* Return the current share permissions
363+
* We always ignore the SHARE permission as this is used for the
364+
* federated sharing.
365+
* @returns {number}
366+
*/
367+
sharePermissions() {
368+
return this.share.permissions & ~OC.PERMISSION_SHARE
369+
},
361370
/**
362371
* Generate a unique random id for this SharingEntryLink only
363372
* This allows ActionRadios to have the same name prop

apps/settings/js/vue-1.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/js/vue-2.js

Lines changed: 4978 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/js/vue-2.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/js/vue-3.js

Lines changed: 3432 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/js/vue-3.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)