Skip to content

Commit

Permalink
Fix federated link sharing permissions
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
skjnldsv committed May 4, 2020
1 parent a93d182 commit 5d0ffce
Show file tree
Hide file tree
Showing 7 changed files with 8,496 additions and 63 deletions.
131 changes: 71 additions & 60 deletions apps/files_sharing/lib/Controller/ShareAPIController.php

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -358,6 +358,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
Expand Down
1 change: 1 addition & 0 deletions apps/settings/js/vue-1.js.map

Large diffs are not rendered by default.

4,978 changes: 4,978 additions & 0 deletions apps/settings/js/vue-2.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/settings/js/vue-2.js.map

Large diffs are not rendered by default.

3,432 changes: 3,432 additions & 0 deletions apps/settings/js/vue-3.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/settings/js/vue-3.js.map

Large diffs are not rendered by default.

0 comments on commit 5d0ffce

Please sign in to comment.