diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2025-03-11 23:41:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 23:41:01 +0100 |
commit | 703c60d2cd14077e2a7af6a8913dc88319431b51 (patch) | |
tree | f4246d37e63da8facdff4a39e9a03a952b015664 | |
parent | afeda70a8db4150a8c6f213daa83d6c4c3e8bbac (diff) | |
parent | 21bbb61a70338d4964bc6fd33452bc23f20ec371 (diff) | |
download | nextcloud-server-703c60d2cd14077e2a7af6a8913dc88319431b51.tar.gz nextcloud-server-703c60d2cd14077e2a7af6a8913dc88319431b51.zip |
Merge pull request #51407 from nextcloud/backport/51404/stable29
[stable29] fix(lookup-server): disable when not using global scale
13 files changed, 89 insertions, 75 deletions
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index 31d0a84136c..b35bdd90ed3 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -1039,8 +1039,10 @@ class FederatedShareProvider implements IShareProvider { if ($this->gsConfig->isGlobalScaleEnabled()) { return true; } - $result = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes'); - return ($result === 'yes'); + $result = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no') === 'yes'; + // TODO: Reenable if lookup server is used again + // return $result; + return false; } @@ -1054,8 +1056,10 @@ class FederatedShareProvider implements IShareProvider { if ($this->gsConfig->isGlobalScaleEnabled()) { return false; } - $result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes'); - return ($result === 'yes'); + $result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') === 'yes'; + // TODO: Reenable if lookup server is used again + // return $result; + return false; } /** diff --git a/apps/federatedfilesharing/src/components/AdminSettings.vue b/apps/federatedfilesharing/src/components/AdminSettings.vue index f9de2e0858c..881795a1e97 100644 --- a/apps/federatedfilesharing/src/components/AdminSettings.vue +++ b/apps/federatedfilesharing/src/components/AdminSettings.vue @@ -50,17 +50,23 @@ {{ t('federatedfilesharing', 'Allow people on this server to receive group shares from other servers') }} </NcCheckboxRadioSwitch> - <NcCheckboxRadioSwitch type="switch" - :checked.sync="lookupServerEnabled" - @update:checked="update('lookupServerEnabled', lookupServerEnabled)"> - {{ t('federatedfilesharing', 'Search global and public address book for people') }} - </NcCheckboxRadioSwitch> + <fieldset> + <legend>{{ t('federatedfilesharing', 'The lookup server is only available for global scale.') }}</legend> - <NcCheckboxRadioSwitch type="switch" - :checked.sync="lookupServerUploadEnabled" - @update:checked="update('lookupServerUploadEnabled', lookupServerUploadEnabled)"> - {{ t('federatedfilesharing', 'Allow people to publish their data to a global and public address book') }} - </NcCheckboxRadioSwitch> + <NcCheckboxRadioSwitch type="switch" + :checked.sync="lookupServerEnabled" + disabled + @update:checked="update('lookupServerEnabled', lookupServerEnabled)"> + {{ t('federatedfilesharing', 'Search global and public address book for people') }} + </NcCheckboxRadioSwitch> + + <NcCheckboxRadioSwitch type="switch" + :checked.sync="lookupServerUploadEnabled" + disabled + @update:checked="update('lookupServerUploadEnabled', lookupServerUploadEnabled)"> + {{ t('federatedfilesharing', 'Allow people to publish their data to a global and public address book') }} + </NcCheckboxRadioSwitch> + </fieldset> </NcSettingsSection> </template> diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 40b8b944507..f6d685b1402 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -848,7 +848,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->gsConfig->expects($this->once())->method('isGlobalScaleEnabled') ->willReturn($gsEnabled); $this->config->expects($this->any())->method('getAppValue') - ->with('files_sharing', 'lookupServerEnabled', 'yes') + ->with('files_sharing', 'lookupServerEnabled', 'no') ->willReturn($isEnabled); $this->assertSame($expected, @@ -859,10 +859,13 @@ class FederatedShareProviderTest extends \Test\TestCase { public function dataTestIsLookupServerQueriesEnabled() { return [ - [false, 'yes', true], - [false, 'no', false], [true, 'yes', true], [true, 'no', true], + // TODO: reenable if we use the lookup server for non-global scale + // [false, 'yes', true], + // [false, 'no', false], + [false, 'no', false], + [false, 'yes', false], ]; } @@ -876,7 +879,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->gsConfig->expects($this->once())->method('isGlobalScaleEnabled') ->willReturn($gsEnabled); $this->config->expects($this->any())->method('getAppValue') - ->with('files_sharing', 'lookupServerUploadEnabled', 'yes') + ->with('files_sharing', 'lookupServerUploadEnabled', 'no') ->willReturn($isEnabled); $this->assertSame($expected, @@ -886,10 +889,13 @@ class FederatedShareProviderTest extends \Test\TestCase { public function dataTestIsLookupServerUploadEnabled() { return [ - [false, 'yes', true], - [false, 'no', false], [true, 'yes', false], [true, 'no', false], + // TODO: reenable if we use the lookup server again + // [false, 'yes', true], + // [false, 'no', false], + [false, 'yes', false], + [false, 'no', false], ]; } diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 31014ac6565..73d34e317c6 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -49,6 +49,7 @@ use OCP\Collaboration\Collaborators\ISearch; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; use OCP\Constants; +use OCP\GlobalScale\IConfig as GlobalScaleIConfig; use OCP\IConfig; use OCP\IRequest; use OCP\IURLGenerator; @@ -211,15 +212,11 @@ class ShareesAPIController extends OCSController { $this->limit = $perPage; $this->offset = $perPage * ($page - 1); - // In global scale mode we always search the loogup server - if ($this->config->getSystemValueBool('gs.enabled', false)) { - $lookup = true; - $this->result['lookupEnabled'] = true; - } else { - $this->result['lookupEnabled'] = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes'; - } + // In global scale mode we always search the lookup server + $this->result['lookupEnabled'] = \OCP\Server::get(GlobalScaleIConfig::class)->isGlobalScaleEnabled(); + // TODO: Reconsider using lookup server for non-global-scale federation - [$result, $hasMoreResults] = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset); + [$result, $hasMoreResults] = $this->collaboratorSearch->search($search, $shareTypes, $this->result['lookupEnabled'], $this->limit, $this->offset); // extra treatment for 'exact' subarray, with a single merge expected keys might be lost if (isset($result['exact'])) { diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index b56e57d272a..a7bd53b23a1 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -36,6 +36,7 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSBadRequestException; use OCP\Collaboration\Collaborators\ISearch; +use OCP\GlobalScale\IConfig as GlobalScaleIConfig; use OCP\IConfig; use OCP\IRequest; use OCP\IURLGenerator; @@ -254,14 +255,14 @@ class ShareesAPIControllerTest extends TestCase { $perPage = $getData['perPage'] ?? 200; $shareType = $getData['shareType'] ?? null; + $globalConfig = $this->createMock(GlobalScaleIConfig::class); + $globalConfig->expects(self::once()) + ->method('isGlobalScaleEnabled') + ->willReturn(true); + $this->overwriteService(GlobalScaleIConfig::class, $globalConfig); + /** @var IConfig|MockObject $config */ $config = $this->createMock(IConfig::class); - $config->expects($this->exactly(1)) - ->method('getAppValue') - ->with($this->anything(), $this->anything(), $this->anything()) - ->willReturnMap([ - ['files_sharing', 'lookupServerEnabled', 'yes', 'yes'], - ]); $this->shareManager->expects($this->once()) ->method('allowGroupSharing') diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php index 52464ec7dea..7f42a91dc81 100644 --- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php +++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php @@ -114,10 +114,12 @@ class RetryJob extends Job { * - max retries are reached (set to 5) */ protected function shouldRemoveBackgroundJob(): bool { - return $this->config->getSystemValueBool('has_internet_connection', true) === false || - $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') === '' || - $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' || - $this->retries >= 5; + // TODO: Remove global scale condition once lookup server is used for non-global scale federation + // return $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') !== 'yes' + return !$this->config->getSystemValueBool('gs.enabled', false) + || $this->config->getSystemValueBool('has_internet_connection', true) === false + || $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') === '' + || $this->retries >= 5; } protected function shouldRun(): bool { @@ -179,7 +181,7 @@ class RetryJob extends Job { $user->getUID(), 'lookup_server_connector', 'update_retries', - $this->retries + 1 + (string)($this->retries + 1), ); } } diff --git a/apps/lookup_server_connector/lib/UpdateLookupServer.php b/apps/lookup_server_connector/lib/UpdateLookupServer.php index 7d1b6a1cb63..31ecb7d0765 100644 --- a/apps/lookup_server_connector/lib/UpdateLookupServer.php +++ b/apps/lookup_server_connector/lib/UpdateLookupServer.php @@ -82,8 +82,9 @@ class UpdateLookupServer { * @return bool */ private function shouldUpdateLookupServer(): bool { - return $this->config->getSystemValueBool('has_internet_connection', true) === true && - $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' && - $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== ''; + // TODO: Consider reenable for non-global-scale setups by checking "'files_sharing', 'lookupServerUploadEnabled'" instead of "gs.enabled" + return $this->config->getSystemValueBool('gs.enabled', false) + && $this->config->getSystemValueBool('has_internet_connection', true) + && $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== ''; } } diff --git a/apps/settings/lib/BackgroundJobs/VerifyUserData.php b/apps/settings/lib/BackgroundJobs/VerifyUserData.php index 122229fc8ab..ff70a47a7a5 100644 --- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php +++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php @@ -145,9 +145,11 @@ class VerifyUserData extends Job { } protected function verifyViaLookupServer(array $argument, string $dataType): bool { - if (empty($this->lookupServerUrl) || - $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' || - $this->config->getSystemValue('has_internet_connection', true) === false) { + // TODO: Consider to enable for non-global-scale setups by checking 'files_sharing', 'lookupServerUploadEnabled' + if (!$this->config->getSystemValueBool('gs.enabled', false) + || empty($this->lookupServerUrl) + || $this->config->getSystemValue('has_internet_connection', true) === false + ) { return true; } diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 6f18d115644..5c2377c58be 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1046,11 +1046,6 @@ <code><![CDATA[$storage1->instanceOfStorage('\OC\Files\ObjectStore\ObjectStoreStorage')]]></code> </RedundantCondition> </file> - <file src="apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php"> - <InvalidArgument> - <code><![CDATA[$this->retries + 1]]></code> - </InvalidArgument> - </file> <file src="apps/oauth2/lib/Controller/OauthApiController.php"> <NoInterfaceProperties> <code><![CDATA[$this->request->server]]></code> diff --git a/dist/federatedfilesharing-vue-settings-admin.js b/dist/federatedfilesharing-vue-settings-admin.js index ff986c2cc51..02027a04c75 100644 --- a/dist/federatedfilesharing-vue-settings-admin.js +++ b/dist/federatedfilesharing-vue-settings-admin.js @@ -1,3 +1,3 @@ /*! For license information please see federatedfilesharing-vue-settings-admin.js.LICENSE.txt */ -(()=>{"use strict";var e,r,n,o={59842:(e,r,n)=>{var o=n(85471),a=n(21777),i=n(53334),d=n(32981),s=n(32073),l=n(88837),c=n(85168),u=n(65043),p=n(63814),h=n(56760);n(51257);const v={name:"AdminSettings",components:{NcCheckboxRadioSwitch:s.A,NcSettingsSection:l.A},data:()=>({outgoingServer2serverShareEnabled:(0,d.C)("federatedfilesharing","outgoingServer2serverShareEnabled"),incomingServer2serverShareEnabled:(0,d.C)("federatedfilesharing","incomingServer2serverShareEnabled"),outgoingServer2serverGroupShareEnabled:(0,d.C)("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),incomingServer2serverGroupShareEnabled:(0,d.C)("federatedfilesharing","incomingServer2serverGroupShareEnabled"),federatedGroupSharingSupported:(0,d.C)("federatedfilesharing","federatedGroupSharingSupported"),lookupServerEnabled:(0,d.C)("federatedfilesharing","lookupServerEnabled"),lookupServerUploadEnabled:(0,d.C)("federatedfilesharing","lookupServerUploadEnabled"),internalOnly:(0,d.C)("federatedfilesharing","internalOnly"),sharingFederatedDocUrl:(0,d.C)("federatedfilesharing","sharingFederatedDocUrl")}),methods:{async update(e,r){await(0,h.C5)();const n=(0,p.KT)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:e}),o=r?"yes":"no";try{const{data:e}=await u.Ay.post(n,{value:o});this.handleResponse({status:e.ocs?.meta?.status})}catch(e){this.handleResponse({errorMessage:t("federatedfilesharing","Unable to update federated files sharing config"),error:e})}},async handleResponse(e){let{status:r,errorMessage:t,error:n}=e;"ok"!==r&&((0,c.Qg)(t),console.error(t,n))}}},f=(0,n(14486).A)(v,(function(){var e=this,r=e._self._c;return r("NcSettingsSection",{attrs:{name:e.t("federatedfilesharing","Federated Cloud Sharing"),description:e.t("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),"doc-url":e.sharingFederatedDocUrl}},[r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverShareEnabled=r},function(r){return e.update("outgoing_server2server_share_enabled",e.outgoingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)"))+"\n\t")]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverShareEnabled},on:{"update:checked":[function(r){e.incomingServer2serverShareEnabled=r},function(r){return e.update("incoming_server2server_share_enabled",e.incomingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to receive shares from other servers"))+"\n\t")]),e._v(" "),e.federatedGroupSharingSupported?r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverGroupShareEnabled=r},function(r){return e.update("outgoing_server2server_group_share_enabled",e.outgoingServer2serverGroupShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to groups on other servers"))+"\n\t")]):e._e(),e._v(" "),e.federatedGroupSharingSupported?r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.incomingServer2serverGroupShareEnabled=r},function(r){return e.update("incoming_server2server_group_share_enabled",e.incomingServer2serverGroupShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to receive group shares from other servers"))+"\n\t")]):e._e(),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerEnabled},on:{"update:checked":[function(r){e.lookupServerEnabled=r},function(r){return e.update("lookupServerEnabled",e.lookupServerEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Search global and public address book for people"))+"\n\t")]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerUploadEnabled},on:{"update:checked":[function(r){e.lookupServerUploadEnabled=r},function(r){return e.update("lookupServerUploadEnabled",e.lookupServerUploadEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people to publish their data to a global and public address book"))+"\n\t")])],1)}),[],!1,null,null,null).exports;n.nc=btoa((0,a.do)()),o.Ay.mixin({methods:{t:i.Tl}}),(0,d.C)("federatedfilesharing","internalOnly",!1)||(new(o.Ay.extend(f))).$mount("#vue-admin-federated")}},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}i.m=o,e=[],i.O=(r,t,n,o)=>{if(!t){var a=1/0;for(c=0;c<e.length;c++){t=e[c][0],n=e[c][1],o=e[c][2];for(var d=!0,s=0;s<t.length;s++)(!1&o||a>=o)&&Object.keys(i.O).every((e=>i.O[e](t[s])))?t.splice(s--,1):(d=!1,o<a&&(a=o));if(d){e.splice(c--,1);var l=n();void 0!==l&&(r=l)}}return r}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[t,n,o]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+"-"+e+".js?v="+{2441:"bd6d3dc836e836cd4795",5775:"bdb5a44b157eaff757ea",5862:"18c97d281a8207f0ce8d"}[e],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="nextcloud:",i.l=(e,t,o,a)=>{if(r[e])r[e].push(t);else{var d,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var u=l[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+o){d=u;break}}d||(s=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,i.nc&&d.setAttribute("nonce",i.nc),d.setAttribute("data-webpack",n+o),d.src=e),r[e]=[t];var p=(t,n)=>{d.onerror=d.onload=null,clearTimeout(h);var o=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),o&&o.forEach((e=>e(n))),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=p.bind(null,d.onerror),d.onload=p.bind(null,d.onload),s&&document.head.appendChild(d)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=5098,(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var r=i.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{i.b=document.baseURI||self.location.href;var e={5098:0};i.f.j=(r,t)=>{var n=i.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=i.p+i.u(r),d=new Error;i.l(a,(t=>{if(i.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;d.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",d.name="ChunkLoadError",d.type=o,d.request=a,n[1](d)}}),"chunk-"+r,r)}},i.O.j=r=>0===e[r];var r=(r,t)=>{var n,o,a=t[0],d=t[1],s=t[2],l=0;if(a.some((r=>0!==e[r]))){for(n in d)i.o(d,n)&&(i.m[n]=d[n]);if(s)var c=s(i)}for(r&&r(t);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(c)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),i.nc=void 0;var d=i.O(void 0,[4208],(()=>i(59842)));d=i.O(d)})(); -//# sourceMappingURL=federatedfilesharing-vue-settings-admin.js.map?v=d35b87412da5c3655b24
\ No newline at end of file +(()=>{"use strict";var e,r,o,n={52529:(e,r,o)=>{var n=o(85471),a=o(21777),i=o(53334),d=o(32981),s=o(32073),l=o(88837),c=o(85168),u=o(65043),p=o(63814),h=o(56760);o(51257);const v={name:"AdminSettings",components:{NcCheckboxRadioSwitch:s.A,NcSettingsSection:l.A},data:()=>({outgoingServer2serverShareEnabled:(0,d.C)("federatedfilesharing","outgoingServer2serverShareEnabled"),incomingServer2serverShareEnabled:(0,d.C)("federatedfilesharing","incomingServer2serverShareEnabled"),outgoingServer2serverGroupShareEnabled:(0,d.C)("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),incomingServer2serverGroupShareEnabled:(0,d.C)("federatedfilesharing","incomingServer2serverGroupShareEnabled"),federatedGroupSharingSupported:(0,d.C)("federatedfilesharing","federatedGroupSharingSupported"),lookupServerEnabled:(0,d.C)("federatedfilesharing","lookupServerEnabled"),lookupServerUploadEnabled:(0,d.C)("federatedfilesharing","lookupServerUploadEnabled"),internalOnly:(0,d.C)("federatedfilesharing","internalOnly"),sharingFederatedDocUrl:(0,d.C)("federatedfilesharing","sharingFederatedDocUrl")}),methods:{async update(e,r){await(0,h.C5)();const o=(0,p.KT)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:e}),n=r?"yes":"no";try{const{data:e}=await u.Ay.post(o,{value:n});this.handleResponse({status:e.ocs?.meta?.status})}catch(e){this.handleResponse({errorMessage:t("federatedfilesharing","Unable to update federated files sharing config"),error:e})}},async handleResponse(e){let{status:r,errorMessage:t,error:o}=e;"ok"!==r&&((0,c.Qg)(t),console.error(t,o))}}},f=(0,o(14486).A)(v,(function(){var e=this,r=e._self._c;return r("NcSettingsSection",{attrs:{name:e.t("federatedfilesharing","Federated Cloud Sharing"),description:e.t("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),"doc-url":e.sharingFederatedDocUrl}},[r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverShareEnabled=r},function(r){return e.update("outgoing_server2server_share_enabled",e.outgoingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)"))+"\n\t")]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverShareEnabled},on:{"update:checked":[function(r){e.incomingServer2serverShareEnabled=r},function(r){return e.update("incoming_server2server_share_enabled",e.incomingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to receive shares from other servers"))+"\n\t")]),e._v(" "),e.federatedGroupSharingSupported?r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverGroupShareEnabled=r},function(r){return e.update("outgoing_server2server_group_share_enabled",e.outgoingServer2serverGroupShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to groups on other servers"))+"\n\t")]):e._e(),e._v(" "),e.federatedGroupSharingSupported?r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.incomingServer2serverGroupShareEnabled=r},function(r){return e.update("incoming_server2server_group_share_enabled",e.incomingServer2serverGroupShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to receive group shares from other servers"))+"\n\t")]):e._e(),e._v(" "),r("fieldset",[r("legend",[e._v(e._s(e.t("federatedfilesharing","The lookup server is only available for global scale.")))]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerEnabled,disabled:""},on:{"update:checked":[function(r){e.lookupServerEnabled=r},function(r){return e.update("lookupServerEnabled",e.lookupServerEnabled)}]}},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Search global and public address book for people"))+"\n\t\t")]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerUploadEnabled,disabled:""},on:{"update:checked":[function(r){e.lookupServerUploadEnabled=r},function(r){return e.update("lookupServerUploadEnabled",e.lookupServerUploadEnabled)}]}},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Allow people to publish their data to a global and public address book"))+"\n\t\t")])],1)],1)}),[],!1,null,null,null).exports;o.nc=btoa((0,a.do)()),n.Ay.mixin({methods:{t:i.Tl}}),(0,d.C)("federatedfilesharing","internalOnly",!1)||(new(n.Ay.extend(f))).$mount("#vue-admin-federated")}},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}i.m=n,e=[],i.O=(r,t,o,n)=>{if(!t){var a=1/0;for(c=0;c<e.length;c++){t=e[c][0],o=e[c][1],n=e[c][2];for(var d=!0,s=0;s<t.length;s++)(!1&n||a>=n)&&Object.keys(i.O).every((e=>i.O[e](t[s])))?t.splice(s--,1):(d=!1,n<a&&(a=n));if(d){e.splice(c--,1);var l=o();void 0!==l&&(r=l)}}return r}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[t,o,n]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+"-"+e+".js?v="+{2441:"bd6d3dc836e836cd4795",5775:"bdb5a44b157eaff757ea",5862:"18c97d281a8207f0ce8d"}[e],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},o="nextcloud:",i.l=(e,t,n,a)=>{if(r[e])r[e].push(t);else{var d,s;if(void 0!==n)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var u=l[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+n){d=u;break}}d||(s=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,i.nc&&d.setAttribute("nonce",i.nc),d.setAttribute("data-webpack",o+n),d.src=e),r[e]=[t];var p=(t,o)=>{d.onerror=d.onload=null,clearTimeout(h);var n=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),n&&n.forEach((e=>e(o))),t)return t(o)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=p.bind(null,d.onerror),d.onload=p.bind(null,d.onload),s&&document.head.appendChild(d)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=5098,(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var r=i.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{i.b=document.baseURI||self.location.href;var e={5098:0};i.f.j=(r,t)=>{var o=i.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var n=new Promise(((t,n)=>o=e[r]=[t,n]));t.push(o[2]=n);var a=i.p+i.u(r),d=new Error;i.l(a,(t=>{if(i.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;d.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",d.name="ChunkLoadError",d.type=n,d.request=a,o[1](d)}}),"chunk-"+r,r)}},i.O.j=r=>0===e[r];var r=(r,t)=>{var o,n,a=t[0],d=t[1],s=t[2],l=0;if(a.some((r=>0!==e[r]))){for(o in d)i.o(d,o)&&(i.m[o]=d[o]);if(s)var c=s(i)}for(r&&r(t);l<a.length;l++)n=a[l],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),i.nc=void 0;var d=i.O(void 0,[4208],(()=>i(52529)));d=i.O(d)})(); +//# sourceMappingURL=federatedfilesharing-vue-settings-admin.js.map?v=30f909a32ba871e805ae
\ No newline at end of file diff --git a/dist/federatedfilesharing-vue-settings-admin.js.map b/dist/federatedfilesharing-vue-settings-admin.js.map index 554ad414345..f8dafe9f9b5 100644 --- a/dist/federatedfilesharing-vue-settings-admin.js.map +++ b/dist/federatedfilesharing-vue-settings-admin.js.map @@ -1 +1 @@ -{"version":3,"file":"federatedfilesharing-vue-settings-admin.js?v=d35b87412da5c3655b24","mappings":";uBAAIA,ECAAC,EACAC,gJC2EJ,MC5EyL,ED4EzL,CACAC,KAAA,gBAEAC,WAAA,CACAC,sBAAA,IACAC,kBAAAA,EAAAA,GAGAC,KAAAA,KACA,CACAC,mCAAAC,EAAAA,EAAAA,GAAA,4DACAC,mCAAAD,EAAAA,EAAAA,GAAA,4DACAE,wCAAAF,EAAAA,EAAAA,GAAA,iEACAG,wCA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GkH,EAAS,IAAIvG,EAASuG,EAAQnH,EAClC,CAEA,IADGiH,GAA4BA,EAA2BrK,GACrDsE,EAAIL,EAASM,OAAQD,IACzBoB,EAAUzB,EAASK,GAChBlB,EAAoBiC,EAAEsE,EAAiBjE,IAAYiE,EAAgBjE,IACrEiE,EAAgBjE,GAAS,KAE1BiE,EAAgBjE,GAAW,EAE5B,OAAOtC,EAAoBW,EAAEC,EAAO,EAGjCyG,EAAqBhB,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FgB,EAAmBxC,QAAQmC,EAAqBjC,KAAK,KAAM,IAC3DsC,EAAmB/D,KAAO0D,EAAqBjC,KAAK,KAAMsC,EAAmB/D,KAAKyB,KAAKsC,QCvFvFrH,EAAoBiE,QAAK9D,ECGzB,IAAImH,EAAsBtH,EAAoBW,OAAER,EAAW,CAAC,OAAO,IAAOH,EAAoB,SAC9FsH,EAAsBtH,EAAoBW,EAAE2G","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/federatedfilesharing/src/components/AdminSettings.vue","webpack:///nextcloud/apps/federatedfilesharing/src/components/AdminSettings.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/federatedfilesharing/src/components/AdminSettings.vue?3636","webpack://nextcloud/./apps/federatedfilesharing/src/components/AdminSettings.vue?93f1","webpack:///nextcloud/apps/federatedfilesharing/src/main-admin.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","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/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (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((key) => (__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};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","<!--\n\t- @copyright 2022 Carl Schwan <carl@carlschwan.eu>\n\t-\n\t- @author Carl Schwan <carl@carlschwan.eu>\n\t-\n\t- @license GNU AGPL version 3 or any later version\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<template>\n\t<NcSettingsSection :name=\"t('federatedfilesharing', 'Federated Cloud Sharing')\"\n\t\t:description=\"t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing.')\"\n\t\t:doc-url=\"sharingFederatedDocUrl\">\n\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t:checked.sync=\"outgoingServer2serverShareEnabled\"\n\t\t\t@update:checked=\"update('outgoing_server2server_share_enabled', outgoingServer2serverShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t:checked.sync=\"incomingServer2serverShareEnabled\"\n\t\t\t@update:checked=\"update('incoming_server2server_share_enabled', incomingServer2serverShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to receive shares from other servers') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-if=\"federatedGroupSharingSupported\"\n\t\t\ttype=\"switch\"\n\t\t\t:checked.sync=\"outgoingServer2serverGroupShareEnabled\"\n\t\t\t@update:checked=\"update('outgoing_server2server_group_share_enabled', outgoingServer2serverGroupShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to send shares to groups on other servers') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-if=\"federatedGroupSharingSupported\"\n\t\t\ttype=\"switch\"\n\t\t\t:checked.sync=\"incomingServer2serverGroupShareEnabled\"\n\t\t\t@update:checked=\"update('incoming_server2server_group_share_enabled', incomingServer2serverGroupShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to receive group shares from other servers') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t:checked.sync=\"lookupServerEnabled\"\n\t\t\t@update:checked=\"update('lookupServerEnabled', lookupServerEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Search global and public address book for people') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t:checked.sync=\"lookupServerUploadEnabled\"\n\t\t\t@update:checked=\"update('lookupServerUploadEnabled', lookupServerUploadEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people to publish their data to a global and public address book') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</NcSettingsSection>\n</template>\n\n<script>\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'\nimport { loadState } from '@nextcloud/initial-state'\nimport { showError } from '@nextcloud/dialogs'\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\n\nexport default {\n\tname: 'AdminSettings',\n\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSettingsSection,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\toutgoingServer2serverShareEnabled: loadState('federatedfilesharing', 'outgoingServer2serverShareEnabled'),\n\t\t\tincomingServer2serverShareEnabled: loadState('federatedfilesharing', 'incomingServer2serverShareEnabled'),\n\t\t\toutgoingServer2serverGroupShareEnabled: loadState('federatedfilesharing', 'outgoingServer2serverGroupShareEnabled'),\n\t\t\tincomingServer2serverGroupShareEnabled: loadState('federatedfilesharing', 'incomingServer2serverGroupShareEnabled'),\n\t\t\tfederatedGroupSharingSupported: loadState('federatedfilesharing', 'federatedGroupSharingSupported'),\n\t\t\tlookupServerEnabled: loadState('federatedfilesharing', 'lookupServerEnabled'),\n\t\t\tlookupServerUploadEnabled: loadState('federatedfilesharing', 'lookupServerUploadEnabled'),\n\t\t\tinternalOnly: loadState('federatedfilesharing', 'internalOnly'),\n\t\t\tsharingFederatedDocUrl: loadState('federatedfilesharing', 'sharingFederatedDocUrl'),\n\t\t}\n\t},\n\tmethods: {\n\t\tasync update(key, value) {\n\t\t\tawait confirmPassword()\n\n\t\t\tconst url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {\n\t\t\t\tappId: 'files_sharing',\n\t\t\t\tkey,\n\t\t\t})\n\n\t\t\tconst stringValue = value ? 'yes' : 'no'\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(url, {\n\t\t\t\t\tvalue: stringValue,\n\t\t\t\t})\n\t\t\t\tthis.handleResponse({\n\t\t\t\t\tstatus: data.ocs?.meta?.status,\n\t\t\t\t})\n\t\t\t} catch (e) {\n\t\t\t\tthis.handleResponse({\n\t\t\t\t\terrorMessage: t('federatedfilesharing', 'Unable to update federated files sharing config'),\n\t\t\t\t\terror: e,\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tasync handleResponse({ status, errorMessage, error }) {\n\t\t\tif (status !== 'ok') {\n\t\t\t\tshowError(errorMessage)\n\t\t\t\tconsole.error(errorMessage, error)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminSettings.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminSettings.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AdminSettings.vue?vue&type=template&id=4f011896\"\nimport script from \"./AdminSettings.vue?vue&type=script&lang=js\"\nexport * from \"./AdminSettings.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcSettingsSection',{attrs:{\"name\":_vm.t('federatedfilesharing', 'Federated Cloud Sharing'),\"description\":_vm.t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing.'),\"doc-url\":_vm.sharingFederatedDocUrl}},[_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.outgoingServer2serverShareEnabled},on:{\"update:checked\":[function($event){_vm.outgoingServer2serverShareEnabled=$event},function($event){return _vm.update('outgoing_server2server_share_enabled', _vm.outgoingServer2serverShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)'))+\"\\n\\t\")]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.incomingServer2serverShareEnabled},on:{\"update:checked\":[function($event){_vm.incomingServer2serverShareEnabled=$event},function($event){return _vm.update('incoming_server2server_share_enabled', _vm.incomingServer2serverShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to receive shares from other servers'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.federatedGroupSharingSupported)?_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.outgoingServer2serverGroupShareEnabled},on:{\"update:checked\":[function($event){_vm.outgoingServer2serverGroupShareEnabled=$event},function($event){return _vm.update('outgoing_server2server_group_share_enabled', _vm.outgoingServer2serverGroupShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to send shares to groups on other servers'))+\"\\n\\t\")]):_vm._e(),_vm._v(\" \"),(_vm.federatedGroupSharingSupported)?_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.incomingServer2serverGroupShareEnabled},on:{\"update:checked\":[function($event){_vm.incomingServer2serverGroupShareEnabled=$event},function($event){return _vm.update('incoming_server2server_group_share_enabled', _vm.incomingServer2serverGroupShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to receive group shares from other servers'))+\"\\n\\t\")]):_vm._e(),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.lookupServerEnabled},on:{\"update:checked\":[function($event){_vm.lookupServerEnabled=$event},function($event){return _vm.update('lookupServerEnabled', _vm.lookupServerEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Search global and public address book for people'))+\"\\n\\t\")]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.lookupServerUploadEnabled},on:{\"update:checked\":[function($event){_vm.lookupServerUploadEnabled=$event},function($event){return _vm.update('lookupServerUploadEnabled', _vm.lookupServerUploadEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people to publish their data to a global and public address book'))+\"\\n\\t\")])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2022 Carl Schwan <carl@carlschwan.eu>\n *\n * @author Carl Schwan <carl@carlschwan.eu>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport Vue from 'vue'\nimport { getRequestToken } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport AdminSettings from './components/AdminSettings.vue'\n\n__webpack_nonce__ = btoa(getRequestToken())\n\nVue.mixin({\n\tmethods: {\n\t\tt,\n\t},\n})\n\nconst internalOnly = loadState('federatedfilesharing', 'internalOnly', false)\n\nif (!internalOnly) {\n\tconst AdminSettingsView = Vue.extend(AdminSettings)\n\tnew AdminSettingsView().$mount('#vue-admin-federated')\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"2441\":\"bd6d3dc836e836cd4795\",\"5775\":\"bdb5a44b157eaff757ea\",\"5862\":\"18c97d281a8207f0ce8d\"}[chunkId] + \"\";\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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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 = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 5098;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__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\t5098: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (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((id) => (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));","__webpack_require__.nc = undefined;","// 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, [4208], () => (__webpack_require__(59842)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","name","components","NcCheckboxRadioSwitch","NcSettingsSection","data","outgoingServer2serverShareEnabled","loadState","incomingServer2serverShareEnabled","outgoingServer2serverGroupShareEnabled","incomingServer2serverGroupShareEnabled","federatedGroupSharingSupported","lookupServerEnabled","lookupServerUploadEnabled","internalOnly","sharingFederatedDocUrl","methods","update","key","value","confirmPassword","url","generateOcsUrl","appId","stringValue","axios","post","handleResponse","status","ocs","meta","e","errorMessage","t","error","_ref","showError","console","_vm","this","_c","_self","attrs","on","$event","_v","_s","_e","__webpack_nonce__","btoa","getRequestToken","Vue","mixin","extend","AdminSettings","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","id","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","window","obj","prop","prototype","hasOwnProperty","l","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","type","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"file":"federatedfilesharing-vue-settings-admin.js?v=30f909a32ba871e805ae","mappings":";uBAAIA,ECAAC,EACAC,gJCiFJ,MClFyL,EDkFzL,CACAC,KAAA,gBAEAC,WAAA,CACAC,sBAAA,IACAC,kBAAAA,EAAAA,GAGAC,KAAAA,KACA,CACAC,mCAAAC,EAAAA,EAAAA,GAAA,4DACAC,mCAAAD,EAAAA,EAAAA,GAAA,4DACAE,wCAAAF,EAAAA,EAAAA,GAAA,iEACAG,wCAAAH,EAAAA,EAAAA,GAAA,iEACAI,gCAAAJ,EAAAA,EAAAA,GAAA,yDACAK,qBAAAL,EAAAA,EAAAA,GAAA,8CACAM,2BAAAN,EAAAA,EAAAA,GAAA,oDACAO,cAAAP,EAAAA,EAAA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AAIvG,EAASuG,EAAQnH,EAClC,CAEA,IADGiH,GAA4BA,EAA2BrK,GACrDsE,EAAIL,EAASM,OAAQD,IACzBoB,EAAUzB,EAASK,GAChBlB,EAAoBiC,EAAEsE,EAAiBjE,IAAYiE,EAAgBjE,IACrEiE,EAAgBjE,GAAS,KAE1BiE,EAAgBjE,GAAW,EAE5B,OAAOtC,EAAoBW,EAAEC,EAAO,EAGjCyG,EAAqBhB,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FgB,EAAmBxC,QAAQmC,EAAqBjC,KAAK,KAAM,IAC3DsC,EAAmB/D,KAAO0D,EAAqBjC,KAAK,KAAMsC,EAAmB/D,KAAKyB,KAAKsC,QCvFvFrH,EAAoBiE,QAAK9D,ECGzB,IAAImH,EAAsBtH,EAAoBW,OAAER,EAAW,CAAC,OAAO,IAAOH,EAAoB,SAC9FsH,EAAsBtH,EAAoBW,EAAE2G","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/federatedfilesharing/src/components/AdminSettings.vue","webpack:///nextcloud/apps/federatedfilesharing/src/components/AdminSettings.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/federatedfilesharing/src/components/AdminSettings.vue?3636","webpack://nextcloud/./apps/federatedfilesharing/src/components/AdminSettings.vue?93f1","webpack:///nextcloud/apps/federatedfilesharing/src/main-admin.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","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/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (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((key) => (__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};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","<!--\n\t- @copyright 2022 Carl Schwan <carl@carlschwan.eu>\n\t-\n\t- @author Carl Schwan <carl@carlschwan.eu>\n\t-\n\t- @license GNU AGPL version 3 or any later version\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<template>\n\t<NcSettingsSection :name=\"t('federatedfilesharing', 'Federated Cloud Sharing')\"\n\t\t:description=\"t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing.')\"\n\t\t:doc-url=\"sharingFederatedDocUrl\">\n\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t:checked.sync=\"outgoingServer2serverShareEnabled\"\n\t\t\t@update:checked=\"update('outgoing_server2server_share_enabled', outgoingServer2serverShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t:checked.sync=\"incomingServer2serverShareEnabled\"\n\t\t\t@update:checked=\"update('incoming_server2server_share_enabled', incomingServer2serverShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to receive shares from other servers') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-if=\"federatedGroupSharingSupported\"\n\t\t\ttype=\"switch\"\n\t\t\t:checked.sync=\"outgoingServer2serverGroupShareEnabled\"\n\t\t\t@update:checked=\"update('outgoing_server2server_group_share_enabled', outgoingServer2serverGroupShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to send shares to groups on other servers') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-if=\"federatedGroupSharingSupported\"\n\t\t\ttype=\"switch\"\n\t\t\t:checked.sync=\"incomingServer2serverGroupShareEnabled\"\n\t\t\t@update:checked=\"update('incoming_server2server_group_share_enabled', incomingServer2serverGroupShareEnabled)\">\n\t\t\t{{ t('federatedfilesharing', 'Allow people on this server to receive group shares from other servers') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<fieldset>\n\t\t\t<legend>{{ t('federatedfilesharing', 'The lookup server is only available for global scale.') }}</legend>\n\n\t\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t\t:checked.sync=\"lookupServerEnabled\"\n\t\t\t\tdisabled\n\t\t\t\t@update:checked=\"update('lookupServerEnabled', lookupServerEnabled)\">\n\t\t\t\t{{ t('federatedfilesharing', 'Search global and public address book for people') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\n\t\t\t<NcCheckboxRadioSwitch type=\"switch\"\n\t\t\t\t:checked.sync=\"lookupServerUploadEnabled\"\n\t\t\t\tdisabled\n\t\t\t\t@update:checked=\"update('lookupServerUploadEnabled', lookupServerUploadEnabled)\">\n\t\t\t\t{{ t('federatedfilesharing', 'Allow people to publish their data to a global and public address book') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</fieldset>\n\t</NcSettingsSection>\n</template>\n\n<script>\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'\nimport { loadState } from '@nextcloud/initial-state'\nimport { showError } from '@nextcloud/dialogs'\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\n\nexport default {\n\tname: 'AdminSettings',\n\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSettingsSection,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\toutgoingServer2serverShareEnabled: loadState('federatedfilesharing', 'outgoingServer2serverShareEnabled'),\n\t\t\tincomingServer2serverShareEnabled: loadState('federatedfilesharing', 'incomingServer2serverShareEnabled'),\n\t\t\toutgoingServer2serverGroupShareEnabled: loadState('federatedfilesharing', 'outgoingServer2serverGroupShareEnabled'),\n\t\t\tincomingServer2serverGroupShareEnabled: loadState('federatedfilesharing', 'incomingServer2serverGroupShareEnabled'),\n\t\t\tfederatedGroupSharingSupported: loadState('federatedfilesharing', 'federatedGroupSharingSupported'),\n\t\t\tlookupServerEnabled: loadState('federatedfilesharing', 'lookupServerEnabled'),\n\t\t\tlookupServerUploadEnabled: loadState('federatedfilesharing', 'lookupServerUploadEnabled'),\n\t\t\tinternalOnly: loadState('federatedfilesharing', 'internalOnly'),\n\t\t\tsharingFederatedDocUrl: loadState('federatedfilesharing', 'sharingFederatedDocUrl'),\n\t\t}\n\t},\n\tmethods: {\n\t\tasync update(key, value) {\n\t\t\tawait confirmPassword()\n\n\t\t\tconst url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {\n\t\t\t\tappId: 'files_sharing',\n\t\t\t\tkey,\n\t\t\t})\n\n\t\t\tconst stringValue = value ? 'yes' : 'no'\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(url, {\n\t\t\t\t\tvalue: stringValue,\n\t\t\t\t})\n\t\t\t\tthis.handleResponse({\n\t\t\t\t\tstatus: data.ocs?.meta?.status,\n\t\t\t\t})\n\t\t\t} catch (e) {\n\t\t\t\tthis.handleResponse({\n\t\t\t\t\terrorMessage: t('federatedfilesharing', 'Unable to update federated files sharing config'),\n\t\t\t\t\terror: e,\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tasync handleResponse({ status, errorMessage, error }) {\n\t\t\tif (status !== 'ok') {\n\t\t\t\tshowError(errorMessage)\n\t\t\t\tconsole.error(errorMessage, error)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminSettings.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminSettings.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AdminSettings.vue?vue&type=template&id=a56b9242\"\nimport script from \"./AdminSettings.vue?vue&type=script&lang=js\"\nexport * from \"./AdminSettings.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcSettingsSection',{attrs:{\"name\":_vm.t('federatedfilesharing', 'Federated Cloud Sharing'),\"description\":_vm.t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing.'),\"doc-url\":_vm.sharingFederatedDocUrl}},[_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.outgoingServer2serverShareEnabled},on:{\"update:checked\":[function($event){_vm.outgoingServer2serverShareEnabled=$event},function($event){return _vm.update('outgoing_server2server_share_enabled', _vm.outgoingServer2serverShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)'))+\"\\n\\t\")]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.incomingServer2serverShareEnabled},on:{\"update:checked\":[function($event){_vm.incomingServer2serverShareEnabled=$event},function($event){return _vm.update('incoming_server2server_share_enabled', _vm.incomingServer2serverShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to receive shares from other servers'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.federatedGroupSharingSupported)?_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.outgoingServer2serverGroupShareEnabled},on:{\"update:checked\":[function($event){_vm.outgoingServer2serverGroupShareEnabled=$event},function($event){return _vm.update('outgoing_server2server_group_share_enabled', _vm.outgoingServer2serverGroupShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to send shares to groups on other servers'))+\"\\n\\t\")]):_vm._e(),_vm._v(\" \"),(_vm.federatedGroupSharingSupported)?_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.incomingServer2serverGroupShareEnabled},on:{\"update:checked\":[function($event){_vm.incomingServer2serverGroupShareEnabled=$event},function($event){return _vm.update('incoming_server2server_group_share_enabled', _vm.incomingServer2serverGroupShareEnabled)}]}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people on this server to receive group shares from other servers'))+\"\\n\\t\")]):_vm._e(),_vm._v(\" \"),_c('fieldset',[_c('legend',[_vm._v(_vm._s(_vm.t('federatedfilesharing', 'The lookup server is only available for global scale.')))]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.lookupServerEnabled,\"disabled\":\"\"},on:{\"update:checked\":[function($event){_vm.lookupServerEnabled=$event},function($event){return _vm.update('lookupServerEnabled', _vm.lookupServerEnabled)}]}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Search global and public address book for people'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"type\":\"switch\",\"checked\":_vm.lookupServerUploadEnabled,\"disabled\":\"\"},on:{\"update:checked\":[function($event){_vm.lookupServerUploadEnabled=$event},function($event){return _vm.update('lookupServerUploadEnabled', _vm.lookupServerUploadEnabled)}]}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('federatedfilesharing', 'Allow people to publish their data to a global and public address book'))+\"\\n\\t\\t\")])],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2022 Carl Schwan <carl@carlschwan.eu>\n *\n * @author Carl Schwan <carl@carlschwan.eu>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport Vue from 'vue'\nimport { getRequestToken } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport AdminSettings from './components/AdminSettings.vue'\n\n__webpack_nonce__ = btoa(getRequestToken())\n\nVue.mixin({\n\tmethods: {\n\t\tt,\n\t},\n})\n\nconst internalOnly = loadState('federatedfilesharing', 'internalOnly', false)\n\nif (!internalOnly) {\n\tconst AdminSettingsView = Vue.extend(AdminSettings)\n\tnew AdminSettingsView().$mount('#vue-admin-federated')\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"2441\":\"bd6d3dc836e836cd4795\",\"5775\":\"bdb5a44b157eaff757ea\",\"5862\":\"18c97d281a8207f0ce8d\"}[chunkId] + \"\";\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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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 = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 5098;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__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\t5098: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (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((id) => (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));","__webpack_require__.nc = undefined;","// 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, [4208], () => (__webpack_require__(52529)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","name","components","NcCheckboxRadioSwitch","NcSettingsSection","data","outgoingServer2serverShareEnabled","loadState","incomingServer2serverShareEnabled","outgoingServer2serverGroupShareEnabled","incomingServer2serverGroupShareEnabled","federatedGroupSharingSupported","lookupServerEnabled","lookupServerUploadEnabled","internalOnly","sharingFederatedDocUrl","methods","update","key","value","confirmPassword","url","generateOcsUrl","appId","stringValue","axios","post","handleResponse","status","ocs","meta","e","errorMessage","t","error","_ref","showError","console","_vm","this","_c","_self","attrs","on","$event","_v","_s","_e","__webpack_nonce__","btoa","getRequestToken","Vue","mixin","extend","AdminSettings","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","id","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","window","obj","prop","prototype","hasOwnProperty","l","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","type","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index 5a03e4f8673..bffc064c017 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -54,11 +54,13 @@ class LookupPlugin implements ISearchPlugin { public function search($search, $limit, $offset, ISearchResult $searchResult): bool { $isGlobalScaleEnabled = $this->config->getSystemValueBool('gs.enabled', false); - $isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes'; + $isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no') === 'yes'; $hasInternetConnection = $this->config->getSystemValueBool('has_internet_connection', true); - // if case of Global Scale we always search the lookup server - if (!$isGlobalScaleEnabled && (!$isLookupServerEnabled || !$hasInternetConnection)) { + // If case of Global Scale we always search the lookup server + // TODO: Reconsider using the lookup server for non-global scale + // if (!$isGlobalScaleEnabled && (!$isLookupServerEnabled || !$hasInternetConnection || $disableLookupServer)) { + if (!$isGlobalScaleEnabled) { return false; } diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index 3eb28a861a5..80f58c74f1c 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -89,7 +89,7 @@ class LookupPluginTest extends TestCase { public function testSearchNoLookupServerURI() { $this->config->expects($this->once()) ->method('getAppValue') - ->with('files_sharing', 'lookupServerEnabled', 'yes') + ->with('files_sharing', 'lookupServerEnabled', 'no') ->willReturn('yes'); $this->config->expects($this->exactly(2)) ->method('getSystemValueBool') @@ -97,7 +97,7 @@ class LookupPluginTest extends TestCase { ['gs.enabled', false], ['has_internet_connection', true], )->willReturnOnConsecutiveCalls( - false, + true, true, ); @@ -118,7 +118,7 @@ class LookupPluginTest extends TestCase { public function testSearchNoInternet() { $this->config->expects($this->once()) ->method('getAppValue') - ->with('files_sharing', 'lookupServerEnabled', 'yes') + ->with('files_sharing', 'lookupServerEnabled', 'no') ->willReturn('yes'); $this->config->expects($this->exactly(2)) ->method('getSystemValueBool') @@ -154,7 +154,7 @@ class LookupPluginTest extends TestCase { $this->config->expects($this->once()) ->method('getAppValue') - ->with('files_sharing', 'lookupServerEnabled', 'yes') + ->with('files_sharing', 'lookupServerEnabled', 'no') ->willReturn('yes'); $this->config->expects($this->exactly(2)) ->method('getSystemValueBool') @@ -162,7 +162,7 @@ class LookupPluginTest extends TestCase { ['gs.enabled', false], ['has_internet_connection', true], )->willReturnOnConsecutiveCalls( - false, + true, true, ); @@ -214,9 +214,9 @@ class LookupPluginTest extends TestCase { $this->config->expects($this->once()) ->method('getAppValue') - ->with('files_sharing', 'lookupServerEnabled', 'yes') + ->with('files_sharing', 'lookupServerEnabled', 'no') ->willReturn($LookupEnabled ? 'yes' : 'no'); - if ($GSEnabled || $LookupEnabled) { + if ($GSEnabled) { $searchResult->expects($this->once()) ->method('addResultSet') ->with($type, $searchParams['expectedResult'], []); @@ -274,12 +274,13 @@ class LookupPluginTest extends TestCase { $this->assertFalse($moreResults); } - - public function testSearchLookupServerDisabled() { - $this->config->expects($this->once()) - ->method('getAppValue') - ->with('files_sharing', 'lookupServerEnabled', 'yes') - ->willReturn('no'); + public function testSearchGSDisabled(): void { + $this->config->expects($this->atLeastOnce()) + ->method('getSystemValueBool') + ->willReturnMap([ + ['has_internet_connection', true, true], + ['gs.enabled', false, false], + ]); /** @var ISearchResult|MockObject $searchResult */ $searchResult = $this->createMock(ISearchResult::class); @@ -398,7 +399,6 @@ class LookupPluginTest extends TestCase { 'label' => $fedIDs[0], 'value' => [ 'shareType' => IShare::TYPE_REMOTE, - 'globalScale' => false, 'shareWith' => $fedIDs[0] ], 'extra' => ['federationId' => $fedIDs[0]], @@ -407,7 +407,6 @@ class LookupPluginTest extends TestCase { 'label' => $fedIDs[1], 'value' => [ 'shareType' => IShare::TYPE_REMOTE, - 'globalScale' => false, 'shareWith' => $fedIDs[1] ], 'extra' => ['federationId' => $fedIDs[1]], @@ -416,7 +415,6 @@ class LookupPluginTest extends TestCase { 'label' => $fedIDs[2], 'value' => [ 'shareType' => IShare::TYPE_REMOTE, - 'globalScale' => false, 'shareWith' => $fedIDs[2] ], 'extra' => ['federationId' => $fedIDs[2]], @@ -491,7 +489,7 @@ class LookupPluginTest extends TestCase { 'label' => $fedIDs[0], 'value' => [ 'shareType' => IShare::TYPE_REMOTE, - 'globalScale' => false, + 'globalScale' => true, 'shareWith' => $fedIDs[0] ], 'extra' => ['federationId' => $fedIDs[0]], @@ -500,7 +498,7 @@ class LookupPluginTest extends TestCase { 'label' => $fedIDs[1], 'value' => [ 'shareType' => IShare::TYPE_REMOTE, - 'globalScale' => false, + 'globalScale' => true, 'shareWith' => $fedIDs[1] ], 'extra' => ['federationId' => $fedIDs[1]], @@ -509,7 +507,7 @@ class LookupPluginTest extends TestCase { 'label' => $fedIDs[2], 'value' => [ 'shareType' => IShare::TYPE_REMOTE, - 'globalScale' => false, + 'globalScale' => true, 'shareWith' => $fedIDs[2] ], 'extra' => ['federationId' => $fedIDs[2]], |