Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-01-30 02:10:03 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-01-30 02:14:10 +0300
commit355edcee74cc304ee124c6f68684007f5cc6ebe4 (patch)
treec48373671a5907a185cf8e828abbe091da0273ec
parentab684934ea891348329e9312c2220a4911736df0 (diff)
Fix updating the password of a link share when passwords are enforced
The password input was shown in the popup menu when passwords were not enforced, or when they were enforced but no password was set, which prevented updating/changing the password once set. As the popover menu is shown only when the share is a link share, and the password input should be shown too when password are enforced and a password is set no condition is needed, so now the password input is always shown. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--core/js/sharedialoglinkshareview.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index 62b79c5aece..801f245f6e8 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -85,7 +85,6 @@
' <label for="sharingDialogAllowPublicEditing-{{cid}}">{{publicEditingLabel}}</label>' +
' </span></li>' +
'{{/if}}' +
- '{{#if showPasswordCheckBox}}' +
' <li><span class="shareOption menuitem">' +
' <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" class="checkbox showPasswordCheckbox"' +
' {{#if isPasswordSet}}checked="checked"{{/if}} {{#if isPasswordEnforced}}disabled="disabled"{{/if}} value="1" />' +
@@ -96,7 +95,6 @@
' <input type="submit" class="icon-confirm share-pass-submit" value="" />' +
' <span class="icon icon-loading-small hidden"></span>' +
' </span></li>' +
- '{{/if}}' +
'<li>' +
' <span class="shareOption menuitem">' +
' <input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox"' +
@@ -536,9 +534,6 @@
var isPasswordSet = !!this.model.get('linkShare').password;
var isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')
var isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true
- var showPasswordCheckBox = isLinkShare
- && ( !this.configModel.get('enforcePasswordForPublicLink')
- || !this.model.get('linkShare').password);
var passwordPlaceholderInitial = this.configModel.get('enforcePasswordForPublicLink')
? PASSWORD_PLACEHOLDER_MESSAGE : PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL;
@@ -610,7 +605,6 @@
passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
passwordPlaceholderInitial: passwordPlaceholderInitial,
isPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,
- showPasswordCheckBox: showPasswordCheckBox,
publicUpload: publicUpload && isLinkShare,
publicEditing: publicEditable,
publicEditingChecked: publicEditingChecked,