summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/js/shareconfigmodel.js1
-rw-r--r--core/js/sharedialogshareelistview.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js
index 1ead631db4d..16ab904ad43 100644
--- a/core/js/shareconfigmodel.js
+++ b/core/js/shareconfigmodel.js
@@ -29,6 +29,7 @@
isMailShareAllowed: oc_appconfig.shareByMailEnabled !== undefined,
defaultExpireDate: oc_appconfig.core.defaultExpireDate,
isResharingAllowed: oc_appconfig.core.resharingAllowed,
+ isPasswordForMailSharesRequired: (oc_appconfig.shareByMail === undefined) ? false : oc_appconfig.shareByMail.enforcePasswordProtection,
allowGroupSharing: oc_appconfig.core.allowGroupSharing
},
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 6903dd57c33..726095cf934 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -100,7 +100,7 @@
'{{/if}}' +
'<li>' +
'<span class="shareOption menuitem">' +
- '<input id="password-{{cid}}-{{shareId}}" type="checkbox" name="password" class="password checkbox" {{#if isPasswordSet}}checked="checked"{{/if}}" />' +
+ '<input id="password-{{cid}}-{{shareId}}" type="checkbox" name="password" class="password checkbox" {{#if isPasswordSet}}checked="checked"{{/if}}{{#if isPasswordForMailSharesRequired}}disabled=""{{/if}}" />' +
'<label for="password-{{cid}}-{{shareId}}">{{passwordLabel}}</label>' +
'<div class="passwordContainer-{{cid}}-{{shareId}} {{#unless isPasswordSet}}hidden{{/unless}}">' +
' <label for="passwordField-{{cid}}-{{shareId}}" class="hidden-visually" value="{{password}}">{{passwordLabel}}</label>' +
@@ -268,6 +268,7 @@
crudsLabel: t('core', 'Access control'),
triangleSImage: OC.imagePath('core', 'actions/triangle-s'),
isResharingAllowed: this.configModel.get('isResharingAllowed'),
+ isPasswordForMailSharesRequired: this.configModel.get('isPasswordForMailSharesRequired'),
sharePermissionPossible: this.model.sharePermissionPossible(),
editPermissionPossible: this.model.editPermissionPossible(),
createPermissionPossible: this.model.createPermissionPossible(),