Skip to content

Commit

Permalink
Don't disable actions when saving share permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Jun 19, 2023
1 parent b33cbec commit fbde8f9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 15 deletions.
12 changes: 4 additions & 8 deletions apps/files_sharing/src/components/SharePermissionsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<!-- file -->
<NcActionCheckbox v-if="!isFolder"
:checked="shareHasPermissions(atomicPermissions.UPDATE)"
:disabled="saving"
@update:checked="toggleSharePermissions(atomicPermissions.UPDATE)">
{{ t('files_sharing', 'Allow editing') }}
</NcActionCheckbox>
Expand All @@ -37,21 +36,18 @@
<NcActionRadio :checked="sharePermissionEqual(bundledPermissions.READ_ONLY)"
:value="bundledPermissions.READ_ONLY"
:name="randomFormName"
:disabled="saving"
@change="setSharePermissions(bundledPermissions.READ_ONLY)">
{{ t('files_sharing', 'Read only') }}
</NcActionRadio>

<NcActionRadio :checked="sharePermissionEqual(bundledPermissions.UPLOAD_AND_UPDATE)"
:value="bundledPermissions.UPLOAD_AND_UPDATE"
:disabled="saving"
:name="randomFormName"
@change="setSharePermissions(bundledPermissions.UPLOAD_AND_UPDATE)">
{{ t('files_sharing', 'Allow upload and editing') }}
</NcActionRadio>
<NcActionRadio :checked="sharePermissionEqual(bundledPermissions.FILE_DROP)"
:value="bundledPermissions.FILE_DROP"
:disabled="saving"
:name="randomFormName"
class="sharing-entry__action--public-upload"
@change="setSharePermissions(bundledPermissions.FILE_DROP)">
Expand All @@ -71,22 +67,22 @@
<!-- custom permissions -->
<span v-else :class="{error: !sharePermissionsSetIsValid}">
<NcActionCheckbox :checked="shareHasPermissions(atomicPermissions.READ)"
:disabled="saving || !canToggleSharePermissions(atomicPermissions.READ)"
:disabled="!canToggleSharePermissions(atomicPermissions.READ)"
@update:checked="toggleSharePermissions(atomicPermissions.READ)">
{{ t('files_sharing', 'Read') }}
</NcActionCheckbox>
<NcActionCheckbox :checked="shareHasPermissions(atomicPermissions.CREATE)"
:disabled="saving || !canToggleSharePermissions(atomicPermissions.CREATE)"
:disabled="!canToggleSharePermissions(atomicPermissions.CREATE)"
@update:checked="toggleSharePermissions(atomicPermissions.CREATE)">
{{ t('files_sharing', 'Upload') }}
</NcActionCheckbox>
<NcActionCheckbox :checked="shareHasPermissions(atomicPermissions.UPDATE)"
:disabled="saving || !canToggleSharePermissions(atomicPermissions.UPDATE)"
:disabled="!canToggleSharePermissions(atomicPermissions.UPDATE)"
@update:checked="toggleSharePermissions(atomicPermissions.UPDATE)">
{{ t('files_sharing', 'Edit') }}
</NcActionCheckbox>
<NcActionCheckbox :checked="shareHasPermissions(atomicPermissions.DELETE)"
:disabled="saving || !canToggleSharePermissions(atomicPermissions.DELETE)"
:disabled="!canToggleSharePermissions(atomicPermissions.DELETE)"
@update:checked="toggleSharePermissions(atomicPermissions.DELETE)">
{{ t('files_sharing', 'Delete') }}
</NcActionCheckbox>
Expand Down
3 changes: 3 additions & 0 deletions dist/6117-6117.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/6117-6117.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/6187-6187.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/6187-6187.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

0 comments on commit fbde8f9

Please sign in to comment.