Skip to content

Commit eddd363

Browse files
GretaDnpmbuildbot[bot]
authored andcommitted
fix the folder share
Signed-off-by: GretaD <[email protected]> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
1 parent 7615a25 commit eddd363

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

apps/files_sharing/js/dist/files_sharing_tab.js

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

apps/files_sharing/js/dist/files_sharing_tab.js.map

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

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,33 @@
4242

4343
<!-- create permission -->
4444
<ActionCheckbox
45+
v-if="isFolder"
4546
ref="canCreate"
4647
:checked.sync="canCreate"
4748
:value="permissionsCreate"
4849
:disabled="saving">
4950
{{ t('files_sharing', 'Allow creating') }}
5051
</ActionCheckbox>
51-
<!-- reshare permission -->
52-
<ActionCheckbox
53-
ref="canReshare"
54-
:checked.sync="canReshare"
55-
:value="permissionsShare"
56-
:disabled="saving">
57-
{{ t('files_sharing', 'Allow resharing') }}
58-
</ActionCheckbox>
5952

6053
<!-- delete permission -->
6154
<ActionCheckbox
55+
v-if="isFolder"
6256
ref="canDelete"
6357
:checked.sync="canDelete"
6458
:value="permissionsDelete"
6559
:disabled="saving">
6660
{{ t('files_sharing', 'Allow deleting') }}
6761
</ActionCheckbox>
62+
63+
<!-- reshare permission -->
64+
<ActionCheckbox
65+
ref="canReshare"
66+
:checked.sync="canReshare"
67+
:value="permissionsShare"
68+
:disabled="saving">
69+
{{ t('files_sharing', 'Allow resharing') }}
70+
</ActionCheckbox>
71+
6872
<!-- expiration date -->
6973
<ActionCheckbox :checked.sync="hasExpirationDate"
7074
:disabled="config.isDefaultExpireDateEnforced || saving"
@@ -253,6 +257,14 @@ export default {
253257
}
254258
},
255259
260+
/**
261+
* Is the current share a folder ?
262+
* @returns {boolean}
263+
*/
264+
isFolder() {
265+
return this.fileInfo.type === 'dir'
266+
},
267+
256268
/**
257269
* Does the current share have an expiration date
258270
* @returns {boolean}

0 commit comments

Comments
 (0)