From 347ca20f4e878a9800bc09b42674a492b5508d68 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 23 Jun 2022 17:51:03 +0200 Subject: [PATCH] Rename setting name to reduce its length Signed-off-by: Louis Chemineau --- apps/settings/lib/Settings/Admin/Sharing.php | 2 +- apps/settings/src/admin.js | 6 ------ apps/settings/tests/Settings/Admin/SharingTest.php | 8 ++++---- .../features/bootstrap/CollaborationContext.php | 2 +- dist/settings-legacy-admin.js | 4 ++-- dist/settings-legacy-admin.js.map | 2 +- lib/private/Collaboration/Collaborators/UserPlugin.php | 2 +- lib/private/Share20/Manager.php | 2 +- tests/lib/Collaboration/Collaborators/UserPluginTest.php | 2 +- 9 files changed, 12 insertions(+), 18 deletions(-) diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index ffe1e5acd4596..d3c6839b8f761 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -91,7 +91,7 @@ public function getForm() { 'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'), 'restrictUserEnumerationFullMatchUserId' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes'), 'restrictUserEnumerationFullMatchEmail' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes'), - 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no'), + 'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no'), 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false), 'passwordExcludedGroups' => $excludedPasswordGroupsList, 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false), diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js index eadc91c1759eb..3ad922ed03f5c 100644 --- a/apps/settings/src/admin.js +++ b/apps/settings/src/admin.js @@ -139,12 +139,6 @@ window.addEventListener('DOMContentLoaded', () => { $('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked) }) - $('#shareapi_restrict_user_enumeration_full_match').on('change', function() { - $('#shareapi_restrict_user_enumeration_full_match_userid_setting').toggleClass('hidden', !this.checked) - $('#shareapi_restrict_user_enumeration_full_match_email_setting').toggleClass('hidden', !this.checked) - $('#shareapi_restrict_user_enumeration_full_match_ignore_second_display_name_setting').toggleClass('hidden', !this.checked) - }) - $('#allowLinks').change(function() { $('#publicLinkSettings').toggleClass('hidden', !this.checked) $('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked)) diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php index 4cb94632f02e8..b238e888d3901 100644 --- a/apps/settings/tests/Settings/Admin/SharingTest.php +++ b/apps/settings/tests/Settings/Admin/SharingTest.php @@ -85,7 +85,7 @@ public function testGetFormWithoutExcludedGroups(): void { ['core', 'shareapi_restrict_user_enumeration_full_match', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes', 'yes'], - ['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no', 'no'], + ['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no', 'no'], ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_default_expire_date', 'no', 'no'], ['core', 'shareapi_expire_after_n_days', '7', '7'], @@ -121,7 +121,7 @@ public function testGetFormWithoutExcludedGroups(): void { 'restrictUserEnumerationFullMatch' => 'yes', 'restrictUserEnumerationFullMatchUserId' => 'yes', 'restrictUserEnumerationFullMatchEmail' => 'yes', - 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no', + 'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no', 'enforceLinkPassword' => false, 'onlyShareWithGroupMembers' => false, 'shareAPIEnabled' => 'yes', @@ -166,7 +166,7 @@ public function testGetFormWithExcludedGroups(): void { ['core', 'shareapi_restrict_user_enumeration_full_match', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes', 'yes'], ['core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes', 'yes'], - ['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no', 'no'], + ['core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no', 'no'], ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_default_expire_date', 'no', 'no'], ['core', 'shareapi_expire_after_n_days', '7', '7'], @@ -202,7 +202,7 @@ public function testGetFormWithExcludedGroups(): void { 'restrictUserEnumerationFullMatch' => 'yes', 'restrictUserEnumerationFullMatchUserId' => 'yes', 'restrictUserEnumerationFullMatchEmail' => 'yes', - 'restrictUserEnumerationFullMatchIgnoreSecondDisplayName' => 'no', + 'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no', 'enforceLinkPassword' => false, 'onlyShareWithGroupMembers' => false, 'shareAPIEnabled' => 'yes', diff --git a/build/integration/features/bootstrap/CollaborationContext.php b/build/integration/features/bootstrap/CollaborationContext.php index be6ae0c3b0d6c..adfc357b0e15e 100644 --- a/build/integration/features/bootstrap/CollaborationContext.php +++ b/build/integration/features/bootstrap/CollaborationContext.php @@ -124,7 +124,7 @@ protected function resetAppConfigs(): void { $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match'); $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_userid'); $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_email'); - $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name'); + $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn'); $this->deleteServerConfig('core', 'shareapi_only_share_with_group_members'); } diff --git a/dist/settings-legacy-admin.js b/dist/settings-legacy-admin.js index f94278944e9ce..ef5c9d53d65a5 100644 --- a/dist/settings-legacy-admin.js +++ b/dist/settings-legacy-admin.js @@ -1,2 +1,2 @@ -({39583:function(){var e=this;window.addEventListener("DOMContentLoaded",(function(){$("#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups").each((function(e,t){var s=this;OC.Settings.setupGroupsSelect($(t)),$(t).change((function(e){var t=e.val||[];t=JSON.stringify(t),OCP.AppConfig.setValue("core",$(s).attr("name"),t)}))})),$("#loglevel").change((function(){$.post(OC.generateUrl("/settings/admin/log/level"),{level:$(e).val()},(function(){OC.Log.reload()}))})),$("#shareAPIEnabled").change((function(){$("#shareAPI p:not(#enable)").toggleClass("hidden",!e.checked)})),$("#enableEncryption").change((function(){$("#encryptionAPI div#EncryptionWarning").toggleClass("hidden")})),$("#reallyEnableEncryption").click((function(){$("#encryptionAPI div#EncryptionWarning").toggleClass("hidden"),$("#encryptionAPI div#EncryptionSettingsArea").toggleClass("hidden"),OCP.AppConfig.setValue("core","encryption_enabled","yes"),$("#enableEncryption").attr("disabled","disabled")})),$("#startmigration").click((function(e){$(window).on("beforeunload.encryption",(function(e){return t("settings","Migration in progress. Please wait until the migration is finished")})),e.preventDefault(),$("#startmigration").prop("disabled",!0),OC.msg.startAction("#startmigration_msg",t("settings","Migration started …")),$.post(OC.generateUrl("/settings/admin/startmigration"),"",(function(e){OC.msg.finishedAction("#startmigration_msg",e),"success"===e.status?($("#encryptionAPI div#selectEncryptionModules").toggleClass("hidden"),$("#encryptionAPI div#migrationWarning").toggleClass("hidden")):$("#startmigration").prop("disabled",!1),$(window).off("beforeunload.encryption")}))})),$("#shareapiExpireAfterNDays").on("input",(function(){this.value=this.value.replace(/\D/g,"")})),$("#shareAPI input:not(.noJSAutoUpdate)").change((function(){var e=$(this).val();"checkbox"===$(this).attr("type")&&(e=this.checked?"yes":"no"),OCP.AppConfig.setValue("core",$(this).attr("name"),e)})),$("#shareapiDefaultExpireDate").change((function(){$("setDefaultExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultInternalExpireDate").change((function(){$("#setDefaultInternalExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultRemoteExpireDate").change((function(){$("#setDefaultRemoteExpireDate").toggleClass("hidden",!this.checked)})),$("#enforceLinkPassword").change((function(){$("#selectPasswordsExcludedGroups").toggleClass("hidden",!this.checked)})),$("#publicShareDisclaimer").change((function(){$("#publicShareDisclaimerText").toggleClass("hidden",!this.checked),this.checked||s("")})),$("#shareApiDefaultPermissionsSection input").change((function(e){var t=$("#shareApiDefaultPermissions"),s=$(e.target),i=t.val();return s.is(":checked")?i|=s.val():i&=~s.val(),i|=OC.PERMISSION_READ,t.val(i).change(),e.preventDefault(),!1}));var s=_.debounce((function(e){var s={success:function(){OC.msg.finishedSuccess("#publicShareDisclaimerStatus",t("settings","Saved"))},error:function(){OC.msg.finishedError("#publicShareDisclaimerStatus",t("settings","Not saved"))}};OC.msg.startSaving("#publicShareDisclaimerStatus"),_.isString(e)&&""!==e?OCP.AppConfig.setValue("core","shareapi_public_link_disclaimertext",e,s):($("#publicShareDisclaimerText").val(""),OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",s))}),500);$("#publicShareDisclaimerText").on("change, keyup",(function(){s(this.value)})),$("#shareapi_allow_share_dialog_user_enumeration").on("change",(function(){$("#shareapi_restrict_user_enumeration_to_group_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_to_phone_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_combinewarning_setting").toggleClass("hidden",!this.checked)})),$("#shareapi_restrict_user_enumeration_full_match").on("change",(function(){$("#shareapi_restrict_user_enumeration_full_match_userid_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_full_match_email_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_full_match_ignore_second_display_name_setting").toggleClass("hidden",!this.checked)})),$("#allowLinks").change((function(){$("#publicLinkSettings").toggleClass("hidden",!this.checked),$("#setDefaultExpireDate").toggleClass("hidden",!(this.checked&&$("#shareapiDefaultExpireDate")[0].checked))})),$("#mail_smtpauth").change((function(){this.checked?$("#mail_credentials").removeClass("hidden"):$("#mail_credentials").addClass("hidden")})),$("#mail_smtpmode").change((function(){"smtp"!==$(this).val()?($("#setting_smtpauth").addClass("hidden"),$("#setting_smtphost").addClass("hidden"),$("#mail_smtpsecure_label").addClass("hidden"),$("#mail_smtpsecure").addClass("hidden"),$("#mail_credentials").addClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):($("#setting_smtpauth").removeClass("hidden"),$("#setting_smtphost").removeClass("hidden"),$("#mail_smtpsecure_label").removeClass("hidden"),$("#mail_smtpsecure").removeClass("hidden"),$("#mail_smtpauth").is(":checked")&&$("#mail_credentials").removeClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))})),$("#mail_general_settings_form").change((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings"),type:"POST",data:$("#mail_general_settings_form").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_credentials_settings_submit").click((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings/credentials"),type:"POST",data:$("#mail_credentials_settings").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_smtppassword").click((function(){"text"===e.type&&"********"===e.value&&(e.type="password",e.value="")})),$("#sendtestemail").click((function(e){e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),$.ajax({url:OC.generateUrl("/settings/admin/mailtest"),type:"POST",success:function(){OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))},error:function(e){OC.msg.finishedError("#sendtestmail_msg",e.responseJSON)}})})),$("#allowGroupSharing").change((function(){$("#allowGroupSharing").toggleClass("hidden",!e.checked)})),$("#shareapiExcludeGroups").change((function(){$("#selectExcludedGroups").toggleClass("hidden",!e.checked)})),null!==document.getElementById("security-warning")&&$.when(OC.SetupChecks.checkWebDAV(),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/webfinger",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/nodeinfo",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/caldav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/carddav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocm-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocs-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkSetup(),OC.SetupChecks.checkGeneric(),OC.SetupChecks.checkWOFF2Loading(OC.filePath("core","","fonts/NotoSans-Regular-latin.woff2"),OC.theme.docPlaceholderUrl),OC.SetupChecks.checkDataProtected()).then((function(e,t,s,i,n,a,r,l,c,o,d){var h=[].concat(e,t,s,i,n,a,r,l,c,o,d),g=$("#postsetupchecks");$("#security-warning-state-loading").addClass("hidden");for(var u=!1,m=g.find(".errors"),p=g.find(".warnings"),C=g.find(".info"),_=0;_"+h[_].msg+"");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:p.append("
  • "+h[_].msg+"
  • ");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:m.append("
  • "+h[_].msg+"
  • ")}m.find("li").length>0&&(m.removeClass("hidden"),u=!0),p.find("li").length>0&&(p.removeClass("hidden"),u=!0),C.find("li").length>0&&(C.removeClass("hidden"),u=!0),u?($("#postsetupchecks-hint").removeClass("hidden"),m.find("li").length>0?$("#security-warning-state-failure").removeClass("hidden"):$("#security-warning-state-warning").removeClass("hidden")):0===$("#security-warning").children("ul").children().length?$("#security-warning-state-ok").removeClass("hidden"):$("#security-warning-state-failure").removeClass("hidden")}))}))}})[39583](); -//# sourceMappingURL=settings-legacy-admin.js.map?v=7d5dee9513a670ec587d \ No newline at end of file +({39583:function(){var e=this;window.addEventListener("DOMContentLoaded",(function(){$("#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups").each((function(e,t){var s=this;OC.Settings.setupGroupsSelect($(t)),$(t).change((function(e){var t=e.val||[];t=JSON.stringify(t),OCP.AppConfig.setValue("core",$(s).attr("name"),t)}))})),$("#loglevel").change((function(){$.post(OC.generateUrl("/settings/admin/log/level"),{level:$(e).val()},(function(){OC.Log.reload()}))})),$("#shareAPIEnabled").change((function(){$("#shareAPI p:not(#enable)").toggleClass("hidden",!e.checked)})),$("#enableEncryption").change((function(){$("#encryptionAPI div#EncryptionWarning").toggleClass("hidden")})),$("#reallyEnableEncryption").click((function(){$("#encryptionAPI div#EncryptionWarning").toggleClass("hidden"),$("#encryptionAPI div#EncryptionSettingsArea").toggleClass("hidden"),OCP.AppConfig.setValue("core","encryption_enabled","yes"),$("#enableEncryption").attr("disabled","disabled")})),$("#startmigration").click((function(e){$(window).on("beforeunload.encryption",(function(e){return t("settings","Migration in progress. Please wait until the migration is finished")})),e.preventDefault(),$("#startmigration").prop("disabled",!0),OC.msg.startAction("#startmigration_msg",t("settings","Migration started …")),$.post(OC.generateUrl("/settings/admin/startmigration"),"",(function(e){OC.msg.finishedAction("#startmigration_msg",e),"success"===e.status?($("#encryptionAPI div#selectEncryptionModules").toggleClass("hidden"),$("#encryptionAPI div#migrationWarning").toggleClass("hidden")):$("#startmigration").prop("disabled",!1),$(window).off("beforeunload.encryption")}))})),$("#shareapiExpireAfterNDays").on("input",(function(){this.value=this.value.replace(/\D/g,"")})),$("#shareAPI input:not(.noJSAutoUpdate)").change((function(){var e=$(this).val();"checkbox"===$(this).attr("type")&&(e=this.checked?"yes":"no"),OCP.AppConfig.setValue("core",$(this).attr("name"),e)})),$("#shareapiDefaultExpireDate").change((function(){$("setDefaultExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultInternalExpireDate").change((function(){$("#setDefaultInternalExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultRemoteExpireDate").change((function(){$("#setDefaultRemoteExpireDate").toggleClass("hidden",!this.checked)})),$("#enforceLinkPassword").change((function(){$("#selectPasswordsExcludedGroups").toggleClass("hidden",!this.checked)})),$("#publicShareDisclaimer").change((function(){$("#publicShareDisclaimerText").toggleClass("hidden",!this.checked),this.checked||s("")})),$("#shareApiDefaultPermissionsSection input").change((function(e){var t=$("#shareApiDefaultPermissions"),s=$(e.target),n=t.val();return s.is(":checked")?n|=s.val():n&=~s.val(),n|=OC.PERMISSION_READ,t.val(n).change(),e.preventDefault(),!1}));var s=_.debounce((function(e){var s={success:function(){OC.msg.finishedSuccess("#publicShareDisclaimerStatus",t("settings","Saved"))},error:function(){OC.msg.finishedError("#publicShareDisclaimerStatus",t("settings","Not saved"))}};OC.msg.startSaving("#publicShareDisclaimerStatus"),_.isString(e)&&""!==e?OCP.AppConfig.setValue("core","shareapi_public_link_disclaimertext",e,s):($("#publicShareDisclaimerText").val(""),OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",s))}),500);$("#publicShareDisclaimerText").on("change, keyup",(function(){s(this.value)})),$("#shareapi_allow_share_dialog_user_enumeration").on("change",(function(){$("#shareapi_restrict_user_enumeration_to_group_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_to_phone_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_combinewarning_setting").toggleClass("hidden",!this.checked)})),$("#allowLinks").change((function(){$("#publicLinkSettings").toggleClass("hidden",!this.checked),$("#setDefaultExpireDate").toggleClass("hidden",!(this.checked&&$("#shareapiDefaultExpireDate")[0].checked))})),$("#mail_smtpauth").change((function(){this.checked?$("#mail_credentials").removeClass("hidden"):$("#mail_credentials").addClass("hidden")})),$("#mail_smtpmode").change((function(){"smtp"!==$(this).val()?($("#setting_smtpauth").addClass("hidden"),$("#setting_smtphost").addClass("hidden"),$("#mail_smtpsecure_label").addClass("hidden"),$("#mail_smtpsecure").addClass("hidden"),$("#mail_credentials").addClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):($("#setting_smtpauth").removeClass("hidden"),$("#setting_smtphost").removeClass("hidden"),$("#mail_smtpsecure_label").removeClass("hidden"),$("#mail_smtpsecure").removeClass("hidden"),$("#mail_smtpauth").is(":checked")&&$("#mail_credentials").removeClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))})),$("#mail_general_settings_form").change((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings"),type:"POST",data:$("#mail_general_settings_form").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_credentials_settings_submit").click((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings/credentials"),type:"POST",data:$("#mail_credentials_settings").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_smtppassword").click((function(){"text"===e.type&&"********"===e.value&&(e.type="password",e.value="")})),$("#sendtestemail").click((function(e){e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),$.ajax({url:OC.generateUrl("/settings/admin/mailtest"),type:"POST",success:function(){OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))},error:function(e){OC.msg.finishedError("#sendtestmail_msg",e.responseJSON)}})})),$("#allowGroupSharing").change((function(){$("#allowGroupSharing").toggleClass("hidden",!e.checked)})),$("#shareapiExcludeGroups").change((function(){$("#selectExcludedGroups").toggleClass("hidden",!e.checked)})),null!==document.getElementById("security-warning")&&$.when(OC.SetupChecks.checkWebDAV(),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/webfinger",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/nodeinfo",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/caldav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/carddav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocm-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocs-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkSetup(),OC.SetupChecks.checkGeneric(),OC.SetupChecks.checkWOFF2Loading(OC.filePath("core","","fonts/NotoSans-Regular-latin.woff2"),OC.theme.docPlaceholderUrl),OC.SetupChecks.checkDataProtected()).then((function(e,t,s,n,i,a,l,r,c,o,d){var h=[].concat(e,t,s,n,i,a,l,r,c,o,d),g=$("#postsetupchecks");$("#security-warning-state-loading").addClass("hidden");for(var u=!1,m=g.find(".errors"),p=g.find(".warnings"),C=g.find(".info"),f=0;f"+h[f].msg+"");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:p.append("
  • "+h[f].msg+"
  • ");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:m.append("
  • "+h[f].msg+"
  • ")}m.find("li").length>0&&(m.removeClass("hidden"),u=!0),p.find("li").length>0&&(p.removeClass("hidden"),u=!0),C.find("li").length>0&&(C.removeClass("hidden"),u=!0),u?($("#postsetupchecks-hint").removeClass("hidden"),m.find("li").length>0?$("#security-warning-state-failure").removeClass("hidden"):$("#security-warning-state-warning").removeClass("hidden")):0===$("#security-warning").children("ul").children().length?$("#security-warning-state-ok").removeClass("hidden"):$("#security-warning-state-failure").removeClass("hidden")}))}))}})[39583](); +//# sourceMappingURL=settings-legacy-admin.js.map?v=7f59cc216fc20b44a8be \ No newline at end of file diff --git a/dist/settings-legacy-admin.js.map b/dist/settings-legacy-admin.js.map index 13c8acdee8e15..77ce3b072e363 100644 --- a/dist/settings-legacy-admin.js.map +++ b/dist/settings-legacy-admin.js.map @@ -1 +1 @@ -{"version":3,"file":"settings-legacy-admin.js?v=7d5dee9513a670ec587d","mappings":"8BAAAA,OAAOC,iBAAiB,oBAAoB,WAC3CC,EAAE,iEAAiEC,MAAK,SAASC,EAAOC,GAAS,WAChGC,GAAGC,SAASC,kBAAkBN,EAAEG,IAChCH,EAAEG,GAASI,QAAO,SAACC,GAClB,IAAIC,EAASD,EAAGE,KAAO,GACvBD,EAASE,KAAKC,UAAUH,GACxBI,IAAIC,UAAUC,SAAS,OAAQf,E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AQD,IACpC,OAAQP,EAASO,GAAGvC,MACpB,KAAK5D,GAAGoE,YAAYiC,kBACnBH,EAAQI,OAAO,OAASV,EAASO,GAAGxE,IAAM,SAC1C,MACD,KAAK3B,GAAGoE,YAAYmC,qBACnBN,EAAYK,OAAO,OAASV,EAASO,GAAGxE,IAAM,SAC9C,MACD,KAAK3B,GAAGoE,YAAYoC,mBACpB,QACCT,EAAUO,OAAO,OAASV,EAASO,GAAGxE,IAAM,SAI1CoE,EAAUC,KAAK,MAAMI,OAAS,IACjCL,EAAU3C,YAAY,UACtB0C,GAAc,GAEXG,EAAYD,KAAK,MAAMI,OAAS,IACnCH,EAAY7C,YAAY,UACxB0C,GAAc,GAEXI,EAAQF,KAAK,MAAMI,OAAS,IAC/BF,EAAQ9C,YAAY,UACpB0C,GAAc,GAGXA,GACHlG,EAAE,yBAAyBwD,YAAY,UACnC2C,EAAUC,KAAK,MAAMI,OAAS,EACjCxG,EAAE,mCAAmCwD,YAAY,UAEjDxD,EAAE,mCAAmCwD,YAAY,WAIO,IADjCxD,EAAE,qBACN6G,SAAS,MAAMA,WAAWL,OAC7CxG,EAAE,8BAA8BwD,YAAY,UAE5CxD,EAAE,mCAAmCwD,YAAY,mBCxTlC","sources":["webpack:///nextcloud/apps/settings/src/admin.js","webpack:///nextcloud/webpack/startup"],"sourcesContent":["window.addEventListener('DOMContentLoaded', () => {\n\t$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {\n\t\tOC.Settings.setupGroupsSelect($(element))\n\t\t$(element).change((ev) => {\n\t\t\tlet groups = ev.val || []\n\t\t\tgroups = JSON.stringify(groups)\n\t\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), groups)\n\t\t})\n\t})\n\n\t$('#loglevel').change(() => {\n\t\t$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {\n\t\t\tOC.Log.reload()\n\t\t})\n\t})\n\n\t$('#shareAPIEnabled').change(() => {\n\t\t$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enableEncryption').change(() => {\n\t\t$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')\n\t})\n\n\t$('#reallyEnableEncryption').click(() => {\n\t\t$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')\n\t\t$('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden')\n\t\tOCP.AppConfig.setValue('core', 'encryption_enabled', 'yes')\n\t\t$('#enableEncryption').attr('disabled', 'disabled')\n\t})\n\n\t$('#startmigration').click((event) => {\n\t\t$(window).on('beforeunload.encryption', (e) => {\n\t\t\treturn t('settings', 'Migration in progress. Please wait until the migration is finished')\n\t\t})\n\t\tevent.preventDefault()\n\t\t$('#startmigration').prop('disabled', true)\n\t\tOC.msg.startAction('#startmigration_msg', t('settings', 'Migration started …'))\n\t\t$.post(OC.generateUrl('/settings/admin/startmigration'), '', function(data) {\n\t\t\tOC.msg.finishedAction('#startmigration_msg', data)\n\t\t\tif (data.status === 'success') {\n\t\t\t\t$('#encryptionAPI div#selectEncryptionModules').toggleClass('hidden')\n\t\t\t\t$('#encryptionAPI div#migrationWarning').toggleClass('hidden')\n\t\t\t} else {\n\t\t\t\t$('#startmigration').prop('disabled', false)\n\t\t\t}\n\t\t\t$(window).off('beforeunload.encryption')\n\n\t\t})\n\t})\n\n\t$('#shareapiExpireAfterNDays').on('input', function() {\n\t\tthis.value = this.value.replace(/\\D/g, '')\n\t})\n\n\t$('#shareAPI input:not(.noJSAutoUpdate)').change(function() {\n\t\tlet value = $(this).val()\n\t\tif ($(this).attr('type') === 'checkbox') {\n\t\t\tif (this.checked) {\n\t\t\t\tvalue = 'yes'\n\t\t\t} else {\n\t\t\t\tvalue = 'no'\n\t\t\t}\n\t\t}\n\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), value)\n\t})\n\n\t$('#shareapiDefaultExpireDate').change(function() {\n\t\t$('setDefaultExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultInternalExpireDate').change(function() {\n\t\t$('#setDefaultInternalExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultRemoteExpireDate').change(function() {\n\t\t$('#setDefaultRemoteExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enforceLinkPassword').change(function() {\n\t\t$('#selectPasswordsExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#publicShareDisclaimer').change(function() {\n\t\t$('#publicShareDisclaimerText').toggleClass('hidden', !this.checked)\n\t\tif (!this.checked) {\n\t\t\tsavePublicShareDisclaimerText('')\n\t\t}\n\t})\n\n\t$('#shareApiDefaultPermissionsSection input').change(function(ev) {\n\t\tconst $el = $('#shareApiDefaultPermissions')\n\t\tconst $target = $(ev.target)\n\n\t\tlet value = $el.val()\n\t\tif ($target.is(':checked')) {\n\t\t\tvalue = value | $target.val()\n\t\t} else {\n\t\t\tvalue = value & ~$target.val()\n\t\t}\n\n\t\t// always set read permission\n\t\tvalue |= OC.PERMISSION_READ\n\n\t\t// this will trigger the field's change event and will save it\n\t\t$el.val(value).change()\n\n\t\tev.preventDefault()\n\n\t\treturn false\n\t})\n\n\tconst savePublicShareDisclaimerText = _.debounce(function(value) {\n\t\tconst options = {\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#publicShareDisclaimerStatus', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tOC.msg.finishedError('#publicShareDisclaimerStatus', t('settings', 'Not saved'))\n\t\t\t},\n\t\t}\n\n\t\tOC.msg.startSaving('#publicShareDisclaimerStatus')\n\t\tif (_.isString(value) && value !== '') {\n\t\t\tOCP.AppConfig.setValue('core', 'shareapi_public_link_disclaimertext', value, options)\n\t\t} else {\n\t\t\t$('#publicShareDisclaimerText').val('')\n\t\t\tOCP.AppConfig.deleteKey('core', 'shareapi_public_link_disclaimertext', options)\n\t\t}\n\t}, 500)\n\n\t$('#publicShareDisclaimerText').on('change, keyup', function() {\n\t\tsavePublicShareDisclaimerText(this.value)\n\t})\n\n\t$('#shareapi_allow_share_dialog_user_enumeration').on('change', function() {\n\t\t$('#shareapi_restrict_user_enumeration_to_group_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_to_phone_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapi_restrict_user_enumeration_full_match').on('change', function() {\n\t\t$('#shareapi_restrict_user_enumeration_full_match_userid_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_full_match_email_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_full_match_ignore_second_display_name_setting').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#allowLinks').change(function() {\n\t\t$('#publicLinkSettings').toggleClass('hidden', !this.checked)\n\t\t$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))\n\t})\n\n\t$('#mail_smtpauth').change(function() {\n\t\tif (!this.checked) {\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t} else {\n\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t}\n\t})\n\n\t$('#mail_smtpmode').change(function() {\n\t\tif ($(this).val() !== 'smtp') {\n\t\t\t$('#setting_smtpauth').addClass('hidden')\n\t\t\t$('#setting_smtphost').addClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').addClass('hidden')\n\t\t\t$('#mail_smtpsecure').addClass('hidden')\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').removeClass('hidden')\n\t\t} else {\n\t\t\t$('#setting_smtpauth').removeClass('hidden')\n\t\t\t$('#setting_smtphost').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure').removeClass('hidden')\n\t\t\tif ($('#mail_smtpauth').is(':checked')) {\n\t\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t\t}\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').addClass('hidden')\n\t\t}\n\t})\n\n\tconst changeEmailSettings = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(changeEmailSettings)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_general_settings_form').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\tconst toggleEmailCredentials = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(toggleEmailCredentials)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings/credentials'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_credentials_settings').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\t$('#mail_general_settings_form').change(changeEmailSettings)\n\t$('#mail_credentials_settings_submit').click(toggleEmailCredentials)\n\t$('#mail_smtppassword').click(() => {\n\t\tif (this.type === 'text' && this.value === '********') {\n\t\t\tthis.type = 'password'\n\t\t\tthis.value = ''\n\t\t}\n\t})\n\n\t$('#sendtestemail').click((event) => {\n\t\tevent.preventDefault()\n\t\tOC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending…'))\n\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailtest'),\n\t\t\ttype: 'POST',\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#sendtestmail_msg', t('settings', 'Email sent'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t})\n\n\t$('#allowGroupSharing').change(() => {\n\t\t$('#allowGroupSharing').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiExcludeGroups').change(() => {\n\t\t$('#selectExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\tconst setupChecks = () => {\n\t\t// run setup checks then gather error messages\n\t\t$.when(\n\t\t\tOC.SetupChecks.checkWebDAV(),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/webfinger', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/nodeinfo', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/carddav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocm-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocs-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkSetup(),\n\t\t\tOC.SetupChecks.checkGeneric(),\n\t\t\tOC.SetupChecks.checkWOFF2Loading(OC.filePath('core', '', 'fonts/NotoSans-Regular-latin.woff2'), OC.theme.docPlaceholderUrl),\n\t\t\tOC.SetupChecks.checkDataProtected()\n\t\t).then((check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11) => {\n\t\t\tconst messages = [].concat(check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11)\n\t\t\tconst $el = $('#postsetupchecks')\n\t\t\t$('#security-warning-state-loading').addClass('hidden')\n\n\t\t\tlet hasMessages = false\n\t\t\tconst $errorsEl = $el.find('.errors')\n\t\t\tconst $warningsEl = $el.find('.warnings')\n\t\t\tconst $infoEl = $el.find('.info')\n\n\t\t\tfor (let i = 0; i < messages.length; i++) {\n\t\t\t\tswitch (messages[i].type) {\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_INFO:\n\t\t\t\t\t$infoEl.append('
  • ' + messages[i].msg + '
  • ')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_WARNING:\n\t\t\t\t\t$warningsEl.append('
  • ' + messages[i].msg + '
  • ')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_ERROR:\n\t\t\t\tdefault:\n\t\t\t\t\t$errorsEl.append('
  • ' + messages[i].msg + '
  • ')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t$errorsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($warningsEl.find('li').length > 0) {\n\t\t\t\t$warningsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($infoEl.find('li').length > 0) {\n\t\t\t\t$infoEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\n\t\t\tif (hasMessages) {\n\t\t\t\t$('#postsetupchecks-hint').removeClass('hidden')\n\t\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-warning').removeClass('hidden')\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst securityWarning = $('#security-warning')\n\t\t\t\tif (securityWarning.children('ul').children().length === 0) {\n\t\t\t\t\t$('#security-warning-state-ok').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tif (document.getElementById('security-warning') !== null) {\n\t\tsetupChecks()\n\t}\n})\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[39583]();\n"],"names":["window","addEventListener","$","each","index","element","OC","Settings","setupGroupsSelect","change","ev","groups","val","JSON","stringify","OCP","AppConfig","setValue","attr","post","generateUrl","level","Log","reload","toggleClass","checked","click","event","on","e","t","preventDefault","prop","msg","startAction","data","finishedAction","status","off","this","value","replace","savePublicShareDisclaimerText","$el","$target","target","is","PERMISSION_READ","_","debounce","options","success","finishedSuccess","error","finishedError","startSaving","isString","deleteKey","removeClass","addClass","changeEmailSettings","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","ajax","url","type","serialize","xhr","responseJSON","toggleEmailCredentials","document","getElementById","when","SetupChecks","checkWebDAV","checkWellKnownUrl","theme","docPlaceholderUrl","checkProviderUrl","getRootPath","checkSetup","checkGeneric","checkWOFF2Loading","filePath","checkDataProtected","then","check1","check2","check3","check4","check5","check6","check7","check8","check9","check10","check11","messages","concat","hasMessages","$errorsEl","find","$warningsEl","$infoEl","i","length","MESSAGE_TYPE_INFO","append","MESSAGE_TYPE_WARNING","MESSAGE_TYPE_ERROR","children"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"settings-leg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,KAAK,WACrBC,EAAc5D,EAAI2D,KAAK,aACvBE,EAAU7D,EAAI2D,KAAK,SAEhBG,EAAI,EAAGA,EAAIP,EAASQ,OAAQD,IACpC,OAAQP,EAASO,GAAGvC,MACpB,KAAK5D,GAAGoE,YAAYiC,kBACnBH,EAAQI,OAAO,OAASV,EAASO,GAAGxE,IAAM,SAC1C,MACD,KAAK3B,GAAGoE,YAAYmC,qBACnBN,EAAYK,OAAO,OAASV,EAASO,GAAGxE,IAAM,SAC9C,MACD,KAAK3B,GAAGoE,YAAYoC,mBACpB,QACCT,EAAUO,OAAO,OAASV,EAASO,GAAGxE,IAAM,SAI1CoE,EAAUC,KAAK,MAAMI,OAAS,IACjCL,EAAU3C,YAAY,UACtB0C,GAAc,GAEXG,EAAYD,KAAK,MAAMI,OAAS,IACnCH,EAAY7C,YAAY,UACxB0C,GAAc,GAEXI,EAAQF,KAAK,MAAMI,OAAS,IAC/BF,EAAQ9C,YAAY,UACpB0C,GAAc,GAGXA,GACHlG,EAAE,yBAAyBwD,YAAY,UACnC2C,EAAUC,KAAK,MAAMI,OAAS,EACjCxG,EAAE,mCAAmCwD,YAAY,UAEjDxD,EAAE,mCAAmCwD,YAAY,WAIO,IADjCxD,EAAE,qBACN6G,SAAS,MAAMA,WAAWL,OAC7CxG,EAAE,8BAA8BwD,YAAY,UAE5CxD,EAAE,mCAAmCwD,YAAY,mBClTlC","sources":["webpack:///nextcloud/apps/settings/src/admin.js","webpack:///nextcloud/webpack/startup"],"sourcesContent":["window.addEventListener('DOMContentLoaded', () => {\n\t$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {\n\t\tOC.Settings.setupGroupsSelect($(element))\n\t\t$(element).change((ev) => {\n\t\t\tlet groups = ev.val || []\n\t\t\tgroups = JSON.stringify(groups)\n\t\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), groups)\n\t\t})\n\t})\n\n\t$('#loglevel').change(() => {\n\t\t$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {\n\t\t\tOC.Log.reload()\n\t\t})\n\t})\n\n\t$('#shareAPIEnabled').change(() => {\n\t\t$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enableEncryption').change(() => {\n\t\t$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')\n\t})\n\n\t$('#reallyEnableEncryption').click(() => {\n\t\t$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')\n\t\t$('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden')\n\t\tOCP.AppConfig.setValue('core', 'encryption_enabled', 'yes')\n\t\t$('#enableEncryption').attr('disabled', 'disabled')\n\t})\n\n\t$('#startmigration').click((event) => {\n\t\t$(window).on('beforeunload.encryption', (e) => {\n\t\t\treturn t('settings', 'Migration in progress. Please wait until the migration is finished')\n\t\t})\n\t\tevent.preventDefault()\n\t\t$('#startmigration').prop('disabled', true)\n\t\tOC.msg.startAction('#startmigration_msg', t('settings', 'Migration started …'))\n\t\t$.post(OC.generateUrl('/settings/admin/startmigration'), '', function(data) {\n\t\t\tOC.msg.finishedAction('#startmigration_msg', data)\n\t\t\tif (data.status === 'success') {\n\t\t\t\t$('#encryptionAPI div#selectEncryptionModules').toggleClass('hidden')\n\t\t\t\t$('#encryptionAPI div#migrationWarning').toggleClass('hidden')\n\t\t\t} else {\n\t\t\t\t$('#startmigration').prop('disabled', false)\n\t\t\t}\n\t\t\t$(window).off('beforeunload.encryption')\n\n\t\t})\n\t})\n\n\t$('#shareapiExpireAfterNDays').on('input', function() {\n\t\tthis.value = this.value.replace(/\\D/g, '')\n\t})\n\n\t$('#shareAPI input:not(.noJSAutoUpdate)').change(function() {\n\t\tlet value = $(this).val()\n\t\tif ($(this).attr('type') === 'checkbox') {\n\t\t\tif (this.checked) {\n\t\t\t\tvalue = 'yes'\n\t\t\t} else {\n\t\t\t\tvalue = 'no'\n\t\t\t}\n\t\t}\n\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), value)\n\t})\n\n\t$('#shareapiDefaultExpireDate').change(function() {\n\t\t$('setDefaultExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultInternalExpireDate').change(function() {\n\t\t$('#setDefaultInternalExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultRemoteExpireDate').change(function() {\n\t\t$('#setDefaultRemoteExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enforceLinkPassword').change(function() {\n\t\t$('#selectPasswordsExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#publicShareDisclaimer').change(function() {\n\t\t$('#publicShareDisclaimerText').toggleClass('hidden', !this.checked)\n\t\tif (!this.checked) {\n\t\t\tsavePublicShareDisclaimerText('')\n\t\t}\n\t})\n\n\t$('#shareApiDefaultPermissionsSection input').change(function(ev) {\n\t\tconst $el = $('#shareApiDefaultPermissions')\n\t\tconst $target = $(ev.target)\n\n\t\tlet value = $el.val()\n\t\tif ($target.is(':checked')) {\n\t\t\tvalue = value | $target.val()\n\t\t} else {\n\t\t\tvalue = value & ~$target.val()\n\t\t}\n\n\t\t// always set read permission\n\t\tvalue |= OC.PERMISSION_READ\n\n\t\t// this will trigger the field's change event and will save it\n\t\t$el.val(value).change()\n\n\t\tev.preventDefault()\n\n\t\treturn false\n\t})\n\n\tconst savePublicShareDisclaimerText = _.debounce(function(value) {\n\t\tconst options = {\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#publicShareDisclaimerStatus', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tOC.msg.finishedError('#publicShareDisclaimerStatus', t('settings', 'Not saved'))\n\t\t\t},\n\t\t}\n\n\t\tOC.msg.startSaving('#publicShareDisclaimerStatus')\n\t\tif (_.isString(value) && value !== '') {\n\t\t\tOCP.AppConfig.setValue('core', 'shareapi_public_link_disclaimertext', value, options)\n\t\t} else {\n\t\t\t$('#publicShareDisclaimerText').val('')\n\t\t\tOCP.AppConfig.deleteKey('core', 'shareapi_public_link_disclaimertext', options)\n\t\t}\n\t}, 500)\n\n\t$('#publicShareDisclaimerText').on('change, keyup', function() {\n\t\tsavePublicShareDisclaimerText(this.value)\n\t})\n\n\t$('#shareapi_allow_share_dialog_user_enumeration').on('change', function() {\n\t\t$('#shareapi_restrict_user_enumeration_to_group_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_to_phone_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#allowLinks').change(function() {\n\t\t$('#publicLinkSettings').toggleClass('hidden', !this.checked)\n\t\t$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))\n\t})\n\n\t$('#mail_smtpauth').change(function() {\n\t\tif (!this.checked) {\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t} else {\n\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t}\n\t})\n\n\t$('#mail_smtpmode').change(function() {\n\t\tif ($(this).val() !== 'smtp') {\n\t\t\t$('#setting_smtpauth').addClass('hidden')\n\t\t\t$('#setting_smtphost').addClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').addClass('hidden')\n\t\t\t$('#mail_smtpsecure').addClass('hidden')\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').removeClass('hidden')\n\t\t} else {\n\t\t\t$('#setting_smtpauth').removeClass('hidden')\n\t\t\t$('#setting_smtphost').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure').removeClass('hidden')\n\t\t\tif ($('#mail_smtpauth').is(':checked')) {\n\t\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t\t}\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').addClass('hidden')\n\t\t}\n\t})\n\n\tconst changeEmailSettings = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(changeEmailSettings)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_general_settings_form').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\tconst toggleEmailCredentials = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(toggleEmailCredentials)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings/credentials'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_credentials_settings').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\t$('#mail_general_settings_form').change(changeEmailSettings)\n\t$('#mail_credentials_settings_submit').click(toggleEmailCredentials)\n\t$('#mail_smtppassword').click(() => {\n\t\tif (this.type === 'text' && this.value === '********') {\n\t\t\tthis.type = 'password'\n\t\t\tthis.value = ''\n\t\t}\n\t})\n\n\t$('#sendtestemail').click((event) => {\n\t\tevent.preventDefault()\n\t\tOC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending…'))\n\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailtest'),\n\t\t\ttype: 'POST',\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#sendtestmail_msg', t('settings', 'Email sent'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t})\n\n\t$('#allowGroupSharing').change(() => {\n\t\t$('#allowGroupSharing').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiExcludeGroups').change(() => {\n\t\t$('#selectExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\tconst setupChecks = () => {\n\t\t// run setup checks then gather error messages\n\t\t$.when(\n\t\t\tOC.SetupChecks.checkWebDAV(),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/webfinger', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/nodeinfo', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/carddav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocm-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocs-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkSetup(),\n\t\t\tOC.SetupChecks.checkGeneric(),\n\t\t\tOC.SetupChecks.checkWOFF2Loading(OC.filePath('core', '', 'fonts/NotoSans-Regular-latin.woff2'), OC.theme.docPlaceholderUrl),\n\t\t\tOC.SetupChecks.checkDataProtected()\n\t\t).then((check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11) => {\n\t\t\tconst messages = [].concat(check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11)\n\t\t\tconst $el = $('#postsetupchecks')\n\t\t\t$('#security-warning-state-loading').addClass('hidden')\n\n\t\t\tlet hasMessages = false\n\t\t\tconst $errorsEl = $el.find('.errors')\n\t\t\tconst $warningsEl = $el.find('.warnings')\n\t\t\tconst $infoEl = $el.find('.info')\n\n\t\t\tfor (let i = 0; i < messages.length; i++) {\n\t\t\t\tswitch (messages[i].type) {\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_INFO:\n\t\t\t\t\t$infoEl.append('
  • ' + messages[i].msg + '
  • ')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_WARNING:\n\t\t\t\t\t$warningsEl.append('
  • ' + messages[i].msg + '
  • ')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_ERROR:\n\t\t\t\tdefault:\n\t\t\t\t\t$errorsEl.append('
  • ' + messages[i].msg + '
  • ')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t$errorsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($warningsEl.find('li').length > 0) {\n\t\t\t\t$warningsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($infoEl.find('li').length > 0) {\n\t\t\t\t$infoEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\n\t\t\tif (hasMessages) {\n\t\t\t\t$('#postsetupchecks-hint').removeClass('hidden')\n\t\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-warning').removeClass('hidden')\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst securityWarning = $('#security-warning')\n\t\t\t\tif (securityWarning.children('ul').children().length === 0) {\n\t\t\t\t\t$('#security-warning-state-ok').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tif (document.getElementById('security-warning') !== null) {\n\t\tsetupChecks()\n\t}\n})\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[39583]();\n"],"names":["window","addEventListener","$","each","index","element","OC","Settings","setupGroupsSelect","change","ev","groups","val","JSON","stringify","OCP","AppConfig","setValue","attr","post","generateUrl","level","Log","reload","toggleClass","checked","click","event","on","e","t","preventDefault","prop","msg","startAction","data","finishedAction","status","off","this","value","replace","savePublicShareDisclaimerText","$el","$target","target","is","PERMISSION_READ","_","debounce","options","success","finishedSuccess","error","finishedError","startSaving","isString","deleteKey","removeClass","addClass","changeEmailSettings","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","ajax","url","type","serialize","xhr","responseJSON","toggleEmailCredentials","document","getElementById","when","SetupChecks","checkWebDAV","checkWellKnownUrl","theme","docPlaceholderUrl","checkProviderUrl","getRootPath","checkSetup","checkGeneric","checkWOFF2Loading","filePath","checkDataProtected","then","check1","check2","check3","check4","check5","check6","check7","check8","check9","check10","check11","messages","concat","hasMessages","$errorsEl","find","$warningsEl","$infoEl","i","length","MESSAGE_TYPE_INFO","append","MESSAGE_TYPE_WARNING","MESSAGE_TYPE_ERROR","children"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 12304a66ce99f..9beecdaa6cbbf 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -95,7 +95,7 @@ public function __construct(IConfig $config, $this->shareeEnumerationFullMatch = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes'; $this->shareeEnumerationFullMatchUserId = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes'; $this->shareeEnumerationFullMatchEmail = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes'; - $this->shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes'; + $this->shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes'; } public function search($search, $limit, $offset, ISearchResult $searchResult) { diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index eed86bb41c385..b1a9783d7b82e 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1968,7 +1968,7 @@ public function matchEmail(): bool { } public function ignoreSecondDisplayName(): bool { - return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes'; + return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes'; } public function currentUserCanEnumerateTargetUser(?IUser $currentUser, IUser $targetUser): bool { diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php index 2c8297014d2c0..0d9d89c7f8b60 100644 --- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php @@ -656,7 +656,7 @@ public function dataSearchEnumeration() { [ 'core' => [ 'shareapi_allow_share_dialog_user_enumeration' => 'no', - 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name' => 'yes', + 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn' => 'yes', ], ] ],