diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 01ef13a3e6c0d..673995c4216d5 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -139,6 +139,7 @@ public function testOnlyLinkSharing() { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertIsArray($result['public']); @@ -149,6 +150,7 @@ public function testLinkPassword() { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ['core', 'shareapi_enforce_links_password', 'no', 'yes'], ]; $result = $this->getResults($map); @@ -161,6 +163,7 @@ public function testLinkNoPassword() { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]; $result = $this->getResults($map); @@ -174,6 +177,7 @@ public function testLinkNoExpireDate() { ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_default_expire_date', 'no', 'no'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertArrayHasKey('expire_date', $result['public']); @@ -188,6 +192,7 @@ public function testLinkExpireDate() { ['core', 'shareapi_default_expire_date', 'no', 'yes'], ['core', 'shareapi_expire_after_n_days', '7', '7'], ['core', 'shareapi_enforce_expire_date', 'no', 'no'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertArrayHasKey('expire_date', $result['public']); @@ -203,6 +208,7 @@ public function testLinkExpireDateEnforced() { ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_default_expire_date', 'no', 'yes'], ['core', 'shareapi_enforce_expire_date', 'no', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertArrayHasKey('expire_date', $result['public']); @@ -215,6 +221,7 @@ public function testLinkSendMail() { ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_allow_public_notification', 'no', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertTrue($result['public']['send_mail']); @@ -225,6 +232,7 @@ public function testLinkNoSendMail() { ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_allow_public_notification', 'no', 'no'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertFalse($result['public']['send_mail']); @@ -234,6 +242,7 @@ public function testResharing() { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_resharing', 'yes', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertTrue($result['resharing']); @@ -243,6 +252,7 @@ public function testNoResharing() { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_resharing', 'yes', 'no'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertFalse($result['resharing']); @@ -253,6 +263,7 @@ public function testLinkPublicUpload() { ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_allow_public_upload', 'yes', 'yes'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertTrue($result['public']['upload']); @@ -264,6 +275,7 @@ public function testLinkNoPublicUpload() { ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_allow_public_upload', 'yes', 'no'], + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ]; $result = $this->getResults($map); $this->assertFalse($result['public']['upload']); diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index 15f74c40e1e2b..a5f85003fa421 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -72,6 +72,11 @@ public function getForm() { $linksExcludeGroupsList = !is_null(json_decode($linksExcludedGroups)) ? implode('|', json_decode($linksExcludedGroups, true)) : ''; + $excludedPasswordGroups = $this->config->getAppValue('core', 'shareapi_enforce_links_password_excluded_groups', ''); + $excludedPasswordGroupsList = !is_null(json_decode($excludedPasswordGroups)) + ? implode('|', json_decode($excludedPasswordGroups, true)) : ''; + + $parameters = [ // Built-In Sharing 'sharingAppEnabled' => $this->appManager->isEnabledForUser('files_sharing'), @@ -84,7 +89,9 @@ public function getForm() { 'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'), 'restrictUserEnumerationToPhone' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no'), 'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'), - 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(), + 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false), + 'passwordExcludedGroups' => $excludedPasswordGroupsList, + 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false), 'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(), 'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'), 'shareDefaultExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'), diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js index 24f95ccb2a6bb..479dbba4e2550 100644 --- a/apps/settings/src/admin.js +++ b/apps/settings/src/admin.js @@ -2,7 +2,7 @@ import $ from 'jquery' import 'jquery-ui-dist/jquery-ui' window.addEventListener('DOMContentLoaded', () => { - $('#excludedGroups,#linksExcludedGroups').each((index, element) => { + $('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) { OC.Settings.setupGroupsSelect($(element)) $(element).change((ev) => { let groups = ev.val || [] @@ -96,6 +96,10 @@ window.addEventListener('DOMContentLoaded', () => { $('#setDefaultRemoteExpireDate').toggleClass('hidden', !this.checked) }) + $('#enforceLinkPassword').change(function() { + $('#selectPasswordsExcludedGroups').toggleClass('hidden', !this.checked) + }) + $('#publicShareDisclaimer').change(function() { $('#publicShareDisclaimerText').toggleClass('hidden', !this.checked) if (!this.checked) { diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php index b699e152198c6..b51f933916624 100644 --- a/apps/settings/templates/settings/admin/sharing.php +++ b/apps/settings/templates/settings/admin/sharing.php @@ -120,6 +120,18 @@ } ?> />
+ +
+
+
+
+ + + /> + '7', 'shareRemoteEnforceExpireDate' => 'no', 'allowLinksExcludeGroups' => '', + 'passwordExcludedGroups' => '', + 'passwordExcludedGroupsFeatureEnabled' => false, ], '' ); @@ -208,6 +210,8 @@ public function testGetFormWithExcludedGroups(): void { 'shareRemoteExpireAfterNDays' => '7', 'shareRemoteEnforceExpireDate' => 'no', 'allowLinksExcludeGroups' => '', + 'passwordExcludedGroups' => '', + 'passwordExcludedGroupsFeatureEnabled' => false, ], '' ); diff --git a/config/config.sample.php b/config/config.sample.php index 32a946ceb51b6..a954241d89c3e 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1560,6 +1560,11 @@ */ 'sharing.enable_share_mail' => true, +/** + * Set to true to enable the feature to add exceptions for share password enforcement + */ +'sharing.allow_disabled_password_enforcement_groups' => false, + /** * Set to true to always transfer incoming shares by default * when running "occ files:transfer-ownership". diff --git a/dist/settings-legacy-admin.js b/dist/settings-legacy-admin.js index dd28854bcdeee..010714ab40597 100644 --- a/dist/settings-legacy-admin.js +++ b/dist/settings-legacy-admin.js @@ -1,2 +1,2 @@ -!function(){"use strict";var e,n={39583:function(e,n,i){var s=i(19755),a=i.n(s),r=void i(41704);window.addEventListener("DOMContentLoaded",(function(){a()("#excludedGroups,#linksExcludedGroups").each((function(e,t){OC.Settings.setupGroupsSelect(a()(t)),a()(t).change((function(e){var t=e.val||[];t=JSON.stringify(t),OCP.AppConfig.setValue("core",a()(r).attr("name"),t)}))})),a()("#loglevel").change((function(){a().post(OC.generateUrl("/settings/admin/log/level"),{level:a()(r).val()},(function(){OC.Log.reload()}))})),a()("#backgroundjobs span.crondate").tooltip({placement:"top"}),a()("#backgroundjobs input").change((function(){if(a()(r).is(":checked")){var e=a()(r).val();"ajax"!==e&&"webcron"!==e&&"cron"!==e||OCP.AppConfig.setValue("core","backgroundjobs_mode",e,{success:function(){OCP.AppConfig.deleteKey("core","cronErrors")}})}})),a()("#shareAPIEnabled").change((function(){a()("#shareAPI p:not(#enable)").toggleClass("hidden",!r.checked)})),a()("#enableEncryption").change((function(){a()("#encryptionAPI div#EncryptionWarning").toggleClass("hidden")})),a()("#reallyEnableEncryption").click((function(){a()("#encryptionAPI div#EncryptionWarning").toggleClass("hidden"),a()("#encryptionAPI div#EncryptionSettingsArea").toggleClass("hidden"),OCP.AppConfig.setValue("core","encryption_enabled","yes"),a()("#enableEncryption").attr("disabled","disabled")})),a()("#startmigration").click((function(e){a()(window).on("beforeunload.encryption",(function(e){return t("settings","Migration in progress. Please wait until the migration is finished")})),e.preventDefault(),a()("#startmigration").prop("disabled",!0),OC.msg.startAction("#startmigration_msg",t("settings","Migration started …")),a().post(OC.generateUrl("/settings/admin/startmigration"),"",(function(e){OC.msg.finishedAction("#startmigration_msg",e),"success"===e.status?(a()("#encryptionAPI div#selectEncryptionModules").toggleClass("hidden"),a()("#encryptionAPI div#migrationWarning").toggleClass("hidden")):a()("#startmigration").prop("disabled",!1),a()(window).off("beforeunload.encryption")}))})),a()("#shareapiExpireAfterNDays").on("input",(function(){this.value=this.value.replace(/\D/g,"")})),a()("#shareAPI input:not(.noJSAutoUpdate)").change((function(){var e=a()(this).val();"checkbox"===a()(this).attr("type")&&(e=this.checked?"yes":"no"),OCP.AppConfig.setValue("core",a()(this).attr("name"),e)})),a()("#shareapiDefaultExpireDate").change((function(){a()("setDefaultExpireDate").toggleClass("hidden",!this.checked)})),a()("#shareapiDefaultInternalExpireDate").change((function(){a()("#setDefaultInternalExpireDate").toggleClass("hidden",!this.checked)})),a()("#shareapiDefaultRemoteExpireDate").change((function(){a()("#setDefaultRemoteExpireDate").toggleClass("hidden",!this.checked)})),a()("#publicShareDisclaimer").change((function(){a()("#publicShareDisclaimerText").toggleClass("hidden",!this.checked),this.checked||e("")})),a()("#shareApiDefaultPermissionsSection input").change((function(e){var t=a()("#shareApiDefaultPermissions"),n=a()(e.target),i=t.val();return n.is(":checked")?i|=n.val():i&=~n.val(),i|=OC.PERMISSION_READ,t.val(i).change(),e.preventDefault(),!1}));var e=_.debounce((function(e){var n={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,n):(a()("#publicShareDisclaimerText").val(""),OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",n))}),500);a()("#publicShareDisclaimerText").on("change, keyup",(function(){e(this.value)})),a()("#shareapi_allow_share_dialog_user_enumeration").on("change",(function(){a()("#shareapi_restrict_user_enumeration_to_group_setting").toggleClass("hidden",!this.checked),a()("#shareapi_restrict_user_enumeration_to_phone_setting").toggleClass("hidden",!this.checked),a()("#shareapi_restrict_user_enumeration_combinewarning_setting").toggleClass("hidden",!this.checked)})),a()("#allowLinks").change((function(){a()("#publicLinkSettings").toggleClass("hidden",!this.checked),a()("#setDefaultExpireDate").toggleClass("hidden",!(this.checked&&a()("#shareapiDefaultExpireDate")[0].checked))})),a()("#mail_smtpauth").change((function(){this.checked?a()("#mail_credentials").removeClass("hidden"):a()("#mail_credentials").addClass("hidden")})),a()("#mail_smtpmode").change((function(){"smtp"!==a()(this).val()?(a()("#setting_smtpauth").addClass("hidden"),a()("#setting_smtphost").addClass("hidden"),a()("#mail_smtpsecure_label").addClass("hidden"),a()("#mail_smtpsecure").addClass("hidden"),a()("#mail_credentials").addClass("hidden"),a()("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):(a()("#setting_smtpauth").removeClass("hidden"),a()("#setting_smtphost").removeClass("hidden"),a()("#mail_smtpsecure_label").removeClass("hidden"),a()("#mail_smtpsecure").removeClass("hidden"),a()("#mail_smtpauth").is(":checked")&&a()("#mail_credentials").removeClass("hidden"),a()("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))})),a()("#mail_general_settings_form").change((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),a().ajax({url:OC.generateUrl("/settings/admin/mailsettings"),type:"POST",data:a()("#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)}}))})),a()("#mail_credentials_settings_submit").click((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),a().ajax({url:OC.generateUrl("/settings/admin/mailsettings/credentials"),type:"POST",data:a()("#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)}}))})),a()("#mail_smtppassword").click((function(){"text"===r.type&&"********"===r.value&&(r.type="password",r.value="")})),a()("#sendtestemail").click((function(e){e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),a().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)}})})),a()("#allowGroupSharing").change((function(){a()("#allowGroupSharing").toggleClass("hidden",!r.checked)})),a()("#shareapiExcludeGroups").change((function(){a()("#selectExcludedGroups").toggleClass("hidden",!r.checked)})),null!==document.getElementById("security-warning")&&a().when(OC.SetupChecks.checkWebDAV(),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/webfinger",OC.theme.docPlaceholderUrl,!0===a()("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/nodeinfo",OC.theme.docPlaceholderUrl,!0===a()("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/caldav",OC.theme.docPlaceholderUrl,!0===a()("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/carddav",OC.theme.docPlaceholderUrl,!0===a()("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocm-provider/",OC.theme.docPlaceholderUrl,!0===a()("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocs-provider/",OC.theme.docPlaceholderUrl,!0===a()("#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,n,i,s,r,o,c,l,d,u){var h=[].concat(e,t,n,i,s,r,o,c,l,d,u),g=a()("#postsetupchecks");a()("#security-warning-state-loading").addClass("hidden");for(var p=!1,m=g.find(".errors"),f=g.find(".warnings"),C=g.find(".info"),_=0;_"+h[_].msg+"");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:f.append("
  • "+h[_].msg+"
  • ");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:m.append("
  • "+h[_].msg+"
  • ")}m.find("li").length>0&&(m.removeClass("hidden"),p=!0),f.find("li").length>0&&(f.removeClass("hidden"),p=!0),C.find("li").length>0&&(C.removeClass("hidden"),p=!0),p?(a()("#postsetupchecks-hint").removeClass("hidden"),m.find("li").length>0?a()("#security-warning-state-failure").removeClass("hidden"):a()("#security-warning-state-warning").removeClass("hidden")):0===a()("#security-warning").children("ul").children().length?a()("#security-warning-state-ok").removeClass("hidden"):a()("#security-warning-state-failure").removeClass("hidden")}))}))}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.amdD=function(){throw new Error("define cannot be used indirect")},s.amdO={},e=[],s.O=function(t,n,i,a){if(!n){var r=1/0;for(d=0;d=a)&&Object.keys(s.O).every((function(e){return s.O[e](n[c])}))?n.splice(c--,1):(o=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[n,i,a]},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},s.j=718,function(){s.b=document.baseURI||self.location.href;var e={718:0};s.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,a,r=n[0],o=n[1],c=n[2],l=0;if(r.some((function(t){return 0!==e[t]}))){for(i in o)s.o(o,i)&&(s.m[i]=o[i]);if(c)var d=c(s)}for(t&&t(n);l"+h[_].msg+"");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:f.append("
  • "+h[_].msg+"
  • ");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:m.append("
  • "+h[_].msg+"
  • ")}m.find("li").length>0&&(m.removeClass("hidden"),p=!0),f.find("li").length>0&&(f.removeClass("hidden"),p=!0),C.find("li").length>0&&(C.removeClass("hidden"),p=!0),p?(a()("#postsetupchecks-hint").removeClass("hidden"),m.find("li").length>0?a()("#security-warning-state-failure").removeClass("hidden"):a()("#security-warning-state-warning").removeClass("hidden")):0===a()("#security-warning").children("ul").children().length?a()("#security-warning-state-ok").removeClass("hidden"):a()("#security-warning-state-failure").removeClass("hidden")}))}))}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.amdD=function(){throw new Error("define cannot be used indirect")},s.amdO={},e=[],s.O=function(t,n,i,a){if(!n){var r=1/0;for(d=0;d=a)&&Object.keys(s.O).every((function(e){return s.O[e](n[c])}))?n.splice(c--,1):(o=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[n,i,a]},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},s.j=718,function(){s.b=document.baseURI||self.location.href;var e={718:0};s.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,a,r=n[0],o=n[1],c=n[2],l=0;if(r.some((function(t){return 0!==e[t]}))){for(i in o)s.o(o,i)&&(s.m[i]=o[i]);if(c)var d=c(s)}for(t&&t(n);l 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import $ from 'jquery'\nimport 'jquery-ui-dist/jquery-ui'\n\nwindow.addEventListener('DOMContentLoaded', () => {\n\t$('#excludedGroups,#linksExcludedGroups').each((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$('#backgroundjobs span.crondate').tooltip({ placement: 'top' })\n\n\t$('#backgroundjobs input').change(() => {\n\t\tif ($(this).is(':checked')) {\n\t\t\tconst mode = $(this).val()\n\t\t\tif (mode === 'ajax' || mode === 'webcron' || mode === 'cron') {\n\t\t\t\tOCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode, {\n\t\t\t\t\tsuccess: () => {\n\t\t\t\t\t\t// clear cron errors on background job mode change\n\t\t\t\t\t\tOCP.AppConfig.deleteKey('core', 'cronErrors')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\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$('#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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 718;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t718: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [874], function() { return __webpack_require__(39583); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","window","addEventListener","$","each","index","element","OC","Settings","setupGroupsSelect","change","ev","groups","val","JSON","stringify","OCP","AppConfig","setValue","attr","generateUrl","level","Log","reload","tooltip","placement","is","mode","success","deleteKey","toggleClass","checked","click","event","on","e","t","preventDefault","prop","msg","startAction","data","finishedAction","status","off","this","value","replace","savePublicShareDisclaimerText","$el","$target","target","PERMISSION_READ","_","debounce","options","finishedSuccess","error","finishedError","startSaving","isString","removeClass","addClass","changeEmailSettings","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","url","type","serialize","xhr","responseJSON","toggleEmailCredentials","document","getElementById","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","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","id","loaded","__webpack_modules__","call","m","amdD","Error","amdO","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","obj","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","push","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"settings-legacy-admin.js?v=75f9a97ba617e7098d85","mappings":"6BAAIA,E,iECGJC,OAAOC,iBAAiB,oBAAoB,WAC3CC,GAAAA,CAAE,iEAAiEC,MAAK,SAASC,EAAOC,GAAS,WAChGC,GAAGC,SAASC,kBAAkBN,GAAAA,CAAEG,IAChCH,GAAAA,CAAEG,GAASI,QAAO,SAACC,GAClB,IAAIC,EAASD,EAAGE,KAAO,GACvBD,EAASE,KAAKC,UAAUH,GACxBI,IAAIC,UAAUC,SAAS,OAAQf,GAAAA,CAAE,GAAMgB,KAAK,QAASP,SAIvDT,GAAAA,CAAE,aAAaO,QAAO,WACrBP,IAAAA,KAAOI,GAAGa,YAAY,6BAA8B,CAAEC,MAAOlB,GAAAA,CAAE,GAAMU,QAAS,WAC7EN,GAAGe,IAAIC,eAITpB,GAAAA,CAAE,iCAAiCqB,QAAQ,CAAEC,UAAW,QAExDtB,GAAAA,CAAE,yBAAyBO,QAAO,WACjC,GAAIP,GAAAA,CAAE,GAAMuB,GAAG,YAAa,CAC3B,IAAMC,EAAOxB,GAAAA,CAAE,GAAMU,MACR,SAATc,GAA4B,YAATA,GAA+B,SAATA,GAC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BhD,MAAe,CACrE,IAAIL,KAAYyD,EACZ1D,EAAoBmC,EAAEuB,EAAazD,KACrCD,EAAoBU,EAAET,GAAYyD,EAAYzD,IAGhD,GAAG0D,EAAS,IAAI5C,EAAS4C,EAAQ3D,GAGlC,IADGyD,GAA4BA,EAA2BlI,GACrDiE,EAAIwB,EAASvB,OAAQD,IACzB+D,EAAUvC,EAASxB,GAChBQ,EAAoBmC,EAAEmB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOvD,EAAoBc,EAAEC,IAG1B8C,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBG,KAAOR,EAAqBO,KAAK,KAAMF,EAAmBG,KAAKD,KAAKF,I,GC/CvF,IAAII,EAAsBjE,EAAoBc,OAAEX,EAAW,CAAC,MAAM,WAAa,OAAOH,EAAoB,UAC1GiE,EAAsBjE,EAAoBc,EAAEmD,G","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/settings/src/admin.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import $ from 'jquery'\nimport 'jquery-ui-dist/jquery-ui'\n\nwindow.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$('#backgroundjobs span.crondate').tooltip({ placement: 'top' })\n\n\t$('#backgroundjobs input').change(() => {\n\t\tif ($(this).is(':checked')) {\n\t\t\tconst mode = $(this).val()\n\t\t\tif (mode === 'ajax' || mode === 'webcron' || mode === 'cron') {\n\t\t\t\tOCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode, {\n\t\t\t\t\tsuccess: () => {\n\t\t\t\t\t\t// clear cron errors on background job mode change\n\t\t\t\t\t\tOCP.AppConfig.deleteKey('core', 'cronErrors')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 718;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t718: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [874], function() { return __webpack_require__(39583); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","window","addEventListener","$","each","index","element","OC","Settings","setupGroupsSelect","change","ev","groups","val","JSON","stringify","OCP","AppConfig","setValue","attr","generateUrl","level","Log","reload","tooltip","placement","is","mode","success","deleteKey","toggleClass","checked","click","event","on","e","t","preventDefault","prop","msg","startAction","data","finishedAction","status","off","this","value","replace","savePublicShareDisclaimerText","$el","$target","target","PERMISSION_READ","_","debounce","options","finishedSuccess","error","finishedError","startSaving","isString","removeClass","addClass","changeEmailSettings","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","url","type","serialize","xhr","responseJSON","toggleEmailCredentials","document","getElementById","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","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","id","loaded","__webpack_modules__","call","m","amdD","Error","amdO","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","obj","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","push","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 2aa4d099024a7..1ffd40021aabb 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1784,9 +1784,18 @@ public function shareApiAllowLinks() { /** * Is password on public link requires * + * @param bool Check group membership exclusion * @return bool */ - public function shareApiLinkEnforcePassword() { + public function shareApiLinkEnforcePassword(bool $checkGroupMembership = true) { + $user = $this->userSession->getUser(); + if ($checkGroupMembership && $user !== null) { + $userGroups = $this->groupManager->getUserGroupIds($user); + $excludedGroups = json_decode($this->config->getAppValue('core', 'shareapi_enforce_links_password_excluded_groups', '[]')); + if (count(array_intersect($excludedGroups, $userGroups)) > 0) { + return false; + } + } return $this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes'; } diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 9110678537f07..20867e8047bd6 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -348,15 +348,16 @@ public static function setupFS(?string $user = '') { } /** - * check if a password is required for each public link + * Check if a password is required for each public link * + * @param bool $checkGroupMembership Check group membership exclusion * @return boolean * @suppress PhanDeprecatedFunction */ - public static function isPublicLinkPasswordRequired() { + public static function isPublicLinkPasswordRequired(bool $checkGroupMembership = true) { /** @var IManager $shareManager */ $shareManager = \OC::$server->get(IManager::class); - return $shareManager->shareApiLinkEnforcePassword(); + return $shareManager->shareApiLinkEnforcePassword($checkGroupMembership); } /** diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 8b1f5144b9aa3..8fcbe7235345e 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -317,10 +317,12 @@ public function shareApiAllowLinks(); /** * Is password on public link requires * + * @param bool $checkGroupMembership Check group membership exclusion * @return bool * @since 9.0.0 + * @since 24.0.0 Added optional $checkGroupMembership parameter */ - public function shareApiLinkEnforcePassword(); + public function shareApiLinkEnforcePassword(bool $checkGroupMembership = true); /** * Is default expire date enabled diff --git a/lib/public/Util.php b/lib/public/Util.php index b839318303aa7..6e5e40e604e5e 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -542,12 +542,14 @@ public static function naturalSortCompare($a, $b) { } /** - * check if a password is required for each public link + * Check if a password is required for each public link + * + * @param bool $checkGroupMembership Check group membership exclusion * @return boolean * @since 7.0.0 */ - public static function isPublicLinkPasswordRequired() { - return \OC_Util::isPublicLinkPasswordRequired(); + public static function isPublicLinkPasswordRequired(bool $checkGroupMembership = true) { + return \OC_Util::isPublicLinkPasswordRequired($checkGroupMembership); } /** diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 93f33fe30b95f..a5db95638f8ec 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -505,14 +505,46 @@ public function testVerifyPasswordNullButEnforced() { $this->expectExceptionMessage('Passwords are enforced for link and mail shares'); $this->config->method('getAppValue')->willReturnMap([ + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ['core', 'shareapi_enforce_links_password', 'no', 'yes'], ]); self::invokePrivate($this->manager, 'verifyPassword', [null]); } + public function testVerifyPasswordNotEnforcedGroup() { + $this->config->method('getAppValue')->willReturnMap([ + ['core', 'shareapi_enforce_links_password_excluded_groups', '', '["admin"]'], + ['core', 'shareapi_enforce_links_password', 'no', 'yes'], + ]); + + // Create admin user + $user = $this->createMock(IUser::class); + $this->userSession->method('getUser')->willReturn($user); + $this->groupManager->method('getUserGroupIds')->with($user)->willReturn(['admin']); + + $result = self::invokePrivate($this->manager, 'verifyPassword', [null]); + $this->assertNull($result); + } + + public function testVerifyPasswordNotEnforcedMultipleGroups() { + $this->config->method('getAppValue')->willReturnMap([ + ['core', 'shareapi_enforce_links_password_excluded_groups', '', '["admin", "special"]'], + ['core', 'shareapi_enforce_links_password', 'no', 'yes'], + ]); + + // Create admin user + $user = $this->createMock(IUser::class); + $this->userSession->method('getUser')->willReturn($user); + $this->groupManager->method('getUserGroupIds')->with($user)->willReturn(['special']); + + $result = self::invokePrivate($this->manager, 'verifyPassword', [null]); + $this->assertNull($result); + } + public function testVerifyPasswordNull() { $this->config->method('getAppValue')->willReturnMap([ + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); @@ -522,6 +554,7 @@ public function testVerifyPasswordNull() { public function testVerifyPasswordHook() { $this->config->method('getAppValue')->willReturnMap([ + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); @@ -543,6 +576,7 @@ public function testVerifyPasswordHookFails() { $this->expectExceptionMessage('password not accepted'); $this->config->method('getAppValue')->willReturnMap([ + ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]);