mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #49013 from nextcloud/backport/48991/stable30
[stable30] fix(files_sharing): Password field must not be required if already set
This commit is contained in:
commit
2ebef1e3ba
9 changed files with 22 additions and 10 deletions
|
|
@ -116,8 +116,8 @@
|
|||
autocomplete="new-password"
|
||||
:value="hasUnsavedPassword ? share.newPassword : ''"
|
||||
:error="passwordError"
|
||||
:helper-text="errorPasswordLabel"
|
||||
:required="isPasswordEnforced"
|
||||
:helper-text="errorPasswordLabel || passwordHint"
|
||||
:required="isPasswordEnforced && isNewShare"
|
||||
:label="t('files_sharing', 'Password')"
|
||||
@update:value="onPasswordChange" />
|
||||
|
||||
|
|
@ -713,6 +713,13 @@ export default {
|
|||
return undefined
|
||||
},
|
||||
|
||||
passwordHint() {
|
||||
if (this.isNewShare || this.hasUnsavedPassword) {
|
||||
return undefined
|
||||
}
|
||||
return t('files_sharing', 'Replace current password')
|
||||
},
|
||||
|
||||
/**
|
||||
* Additional actions for the menu
|
||||
*
|
||||
|
|
@ -877,7 +884,7 @@ export default {
|
|||
if (this.hasUnsavedPassword && this.isValidShareAttribute(this.share.newPassword)) {
|
||||
this.share.password = this.share.newPassword
|
||||
this.$delete(this.share, 'newPassword')
|
||||
} else if (this.isPasswordEnforced && !this.isValidShareAttribute(this.share.password)) {
|
||||
} else if (this.isPasswordEnforced && this.isNewShare && !this.isValidShareAttribute(this.share.password)) {
|
||||
this.passwordError = true
|
||||
}
|
||||
} else {
|
||||
|
|
@ -971,6 +978,11 @@ export default {
|
|||
* @param {string} password the changed password
|
||||
*/
|
||||
onPasswordChange(password) {
|
||||
if (password === '') {
|
||||
this.$delete(this.share, 'newPassword')
|
||||
this.passwordError = this.isNewShare && this.isPasswordEnforced
|
||||
return
|
||||
}
|
||||
this.passwordError = !this.isValidShareAttribute(password)
|
||||
this.$set(this.share, 'newPassword', password)
|
||||
},
|
||||
|
|
|
|||
4
dist/6818-6818.js → dist/3154-3154.js
vendored
4
dist/6818-6818.js → dist/3154-3154.js
vendored
File diff suppressed because one or more lines are too long
1
dist/3154-3154.js.map
vendored
Normal file
1
dist/3154-3154.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/3154-3154.js.map.license
vendored
Symbolic link
1
dist/3154-3154.js.map.license
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
3154-3154.js.license
|
||||
1
dist/6818-6818.js.map
vendored
1
dist/6818-6818.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/6818-6818.js.map.license
vendored
1
dist/6818-6818.js.map.license
vendored
|
|
@ -1 +0,0 @@
|
|||
6818-6818.js.license
|
||||
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