mirror of
https://github.com/nextcloud/server.git
synced 2026-02-22 09:21:04 -05:00
Correctly switch/revert from custom to bundled perms
We have a set custom permissions checkbox, that when selected should set the quick permissions settings to custom as well as show the custom permission settings. When the checkbox is unchecked the quick permissions have to be reset to the default, `bundledPermissions.ALL` but also users can switch from custom permissions to `bundled` by just changing the radio select, hence we need a mechanism to set the permissions back to the correct fallback depending on where the user has toggled the the custom permission from. The mechanism is `revertSharingPermission` and this commit, makes sure revert values are correctly set upon toggle. Resolves : https://github.com/nextcloud/server/issues/40431 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
5a9df6c168
commit
481f5bba81
3 changed files with 8 additions and 6 deletions
|
|
@ -255,7 +255,7 @@ export default {
|
|||
return {
|
||||
writeNoteToRecipientIsChecked: false,
|
||||
sharingPermission: BUNDLED_PERMISSIONS.ALL.toString(),
|
||||
revertSharingPermission: null,
|
||||
revertSharingPermission: BUNDLED_PERMISSIONS.ALL.toString(),
|
||||
setCustomPermissions: false,
|
||||
passwordError: false,
|
||||
advancedSectionAccordionExpanded: false,
|
||||
|
|
@ -667,8 +667,10 @@ export default {
|
|||
}
|
||||
this.toggleCustomPermissions()
|
||||
},
|
||||
toggleCustomPermissions() {
|
||||
this.setCustomPermissions = this.sharingPermission === 'custom'
|
||||
toggleCustomPermissions(selectedPermission) {
|
||||
const isCustomPermissions = this.sharingPermission === 'custom'
|
||||
this.revertSharingPermission = !isCustomPermissions ? selectedPermission : 'custom'
|
||||
this.setCustomPermissions = isCustomPermissions
|
||||
},
|
||||
initializeAttributes() {
|
||||
|
||||
|
|
|
|||
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue