Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix federated link sharing permissions
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
skjnldsv authored and npmbuildbot[bot] committed May 4, 2020
commit ff20da637e2d7f46c8acc04fdd7e4329b70df098
6 changes: 3 additions & 3 deletions apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

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.