diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 75bc6261756bc..154f88ceb5242 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -1070,8 +1070,10 @@ public function isLookupServerQueriesEnabled() {
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;
}
@@ -1085,8 +1087,10 @@ public function isLookupServerUploadEnabled() {
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 678e47012c2c4..05cb6366403fa 100644
--- a/apps/federatedfilesharing/src/components/AdminSettings.vue
+++ b/apps/federatedfilesharing/src/components/AdminSettings.vue
@@ -50,17 +50,22 @@
{{ t('federatedfilesharing', 'Allow users on this server to receive group shares from other servers') }}
-
- {{ t('federatedfilesharing', 'Search global and public address book for users') }}
-
+
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index 797d029d6b152..c39bbab4af315 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -849,7 +849,7 @@ public function testIsLookupServerQueriesEnabled($gsEnabled, $isEnabled, $expect
$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,
@@ -860,10 +860,13 @@ public function testIsLookupServerQueriesEnabled($gsEnabled, $isEnabled, $expect
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],
];
}
@@ -877,7 +880,7 @@ public function testIsLookupServerUploadEnabled($gsEnabled, $isEnabled, $expecte
$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,
@@ -887,10 +890,13 @@ public function testIsLookupServerUploadEnabled($gsEnabled, $isEnabled, $expecte
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 699c568f38015..c2a8f0e901d5f 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -37,7 +37,6 @@
*/
namespace OCA\Files_Sharing\Controller;
-use OCP\Constants;
use function array_slice;
use function array_values;
use Generator;
@@ -48,6 +47,8 @@
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;
@@ -225,15 +226,11 @@ public function search(string $search = '', string $itemType = null, int $page =
$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 860d5796e56dc..60cb079ea5a75 100644
--- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
@@ -35,6 +35,7 @@
use OCP\AppFramework\Http;
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;
@@ -240,14 +241,14 @@ public function testSearch(array $getData, string $apiSetting, string $enumSetti
$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 39d8118abe71d..e629060cdd88e 100644
--- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
+++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@@ -115,10 +115,12 @@ public function start(IJobList $jobList): void {
* - 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 {
@@ -180,7 +182,7 @@ protected function run($argument): void {
$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 ec528e6effa7f..4e58a67733c29 100644
--- a/apps/lookup_server_connector/lib/UpdateLookupServer.php
+++ b/apps/lookup_server_connector/lib/UpdateLookupServer.php
@@ -82,8 +82,9 @@ public function userUpdated(IUser $user): void {
* @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 ec75f4243bec2..30afe1f7edab7 100644
--- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php
+++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php
@@ -169,9 +169,11 @@ protected function verifyWebsite(array $argument) {
}
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/dist/federatedfilesharing-vue-settings-admin.js b/dist/federatedfilesharing-vue-settings-admin.js
index f44d3eec5ca13..d7e47398bb7fc 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 */
-!function(){"use strict";var e,r={96441:function(e,r,n){var o=n(20144),a=n(22200),i=n(9944),d=(n(36144),n(16453)),s=n(20571),u=n.n(s),c=n(13299),l=n.n(c),h=n(64024),v=n(4820),f=n(79753),g=n(10128),p=(n(65509),n(25108));function S(e,r,n,t,o,a,i){try{var d=e[a](i),s=d.value}catch(e){return void n(e)}d.done?r(s):Promise.resolve(s).then(t,o)}function b(e){return function(){var r=this,n=arguments;return new Promise((function(t,o){var a=e.apply(r,n);function i(e){S(a,t,o,i,d,"next",e)}function d(e){S(a,t,o,i,d,"throw",e)}i(void 0)}))}}var m={name:"AdminSettings",components:{NcCheckboxRadioSwitch:u(),NcSettingsSection:l()},data:function(){return{outgoingServer2serverShareEnabled:(0,d.loadState)("federatedfilesharing","outgoingServer2serverShareEnabled"),incomingServer2serverShareEnabled:(0,d.loadState)("federatedfilesharing","incomingServer2serverShareEnabled"),outgoingServer2serverGroupShareEnabled:(0,d.loadState)("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),incomingServer2serverGroupShareEnabled:(0,d.loadState)("federatedfilesharing","incomingServer2serverGroupShareEnabled"),federatedGroupSharingSupported:(0,d.loadState)("federatedfilesharing","federatedGroupSharingSupported"),lookupServerEnabled:(0,d.loadState)("federatedfilesharing","lookupServerEnabled"),lookupServerUploadEnabled:(0,d.loadState)("federatedfilesharing","lookupServerUploadEnabled"),internalOnly:(0,d.loadState)("federatedfilesharing","internalOnly"),sharingFederatedDocUrl:(0,d.loadState)("federatedfilesharing","sharingFederatedDocUrl")}},methods:{update:function(e,r){var n=this;return b(regeneratorRuntime.mark((function o(){var a,i,d,s,u,c;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,g.confirmPassword)();case 2:return a=(0,f.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:e}),i=r?"yes":"no",o.prev=4,o.next=7,v.default.post(a,{value:i});case 7:u=o.sent,c=u.data,n.handleResponse({status:null===(d=c.ocs)||void 0===d||null===(s=d.meta)||void 0===s?void 0:s.status}),o.next=15;break;case 12:o.prev=12,o.t0=o.catch(4),n.handleResponse({errorMessage:t("federatedfilesharing","Unable to update federated files sharing config"),error:o.t0});case 15:case"end":return o.stop()}}),o,null,[[4,12]])})))()},handleResponse:function(e){return b(regeneratorRuntime.mark((function r(){var n,t,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=e.status,t=e.errorMessage,o=e.error,"ok"!==n&&((0,h.x2)(t),p.error(t,o));case 2:case"end":return r.stop()}}),r)})))()}}},y=(0,n(51900).Z)(m,(function(){var e=this,r=e._self._c;return r("NcSettingsSection",{attrs:{title:e.t("federatedfilesharing","Federated Cloud Sharing"),description:e.t("federatedfilesharing","Adjust how people can share between servers. This includes shares between users 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 users 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 users 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 users 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 users 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 users"))+"\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 users to publish their data to a global and public address book"))+"\n\t")])],1)}),[],!1,null,null,null).exports;n.nc=btoa((0,a.getRequestToken)()),o.ZP.mixin({methods:{t:i.translate}}),(0,d.loadState)("federatedfilesharing","internalOnly",!1)||(new(o.ZP.extend(y))).$mount("#vue-admin-federated")},81490:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=r,o.amdD=function(){throw new Error("define cannot be used indirect")},o.amdO={},e=[],o.O=function(r,n,t,a){if(!n){var i=1/0;for(c=0;c=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[s])}))?n.splice(s--,1):(d=!1,a0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[n,t,a]},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var n in r)o.o(r,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},o.j=7220,function(){o.b=document.baseURI||self.location.href;var e={7220:0};o.O.j=function(r){return 0===e[r]};var r=function(r,n){var t,a,i=n[0],d=n[1],s=n[2],u=0;if(i.some((function(r){return 0!==e[r]}))){for(t in d)o.o(d,t)&&(o.m[t]=d[t]);if(s)var c=s(o)}for(r&&r(n);u=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[s])}))?n.splice(s--,1):(d=!1,a0&&e[l-1][2]>a;l--)e[l]=e[l-1];e[l]=[n,t,a]},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var n in r)o.o(r,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},o.j=7220,function(){o.b=document.baseURI||self.location.href;var e={7220:0};o.O.j=function(r){return 0===e[r]};var r=function(r,n){var t,a,i=n[0],d=n[1],s=n[2],u=0;if(i.some((function(r){return 0!==e[r]}))){for(t in d)o.o(d,t)&&(o.m[t]=d[t]);if(s)var l=s(o)}for(r&&r(n);u 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};","\n\n\n\t\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to receive shares from other servers') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to send shares to groups on other servers') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to receive group shares from other servers') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Search global and public address book for users') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users to publish their data to a global and public address book') }}\n\t\t\n\t\n\n\n\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=79b63c82\"\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:{\"title\":_vm.t('federatedfilesharing', 'Federated Cloud Sharing'),\"description\":_vm.t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between users 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 users 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 users 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 users 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 users 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 users'))+\"\\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 users 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 \n *\n * @author Carl Schwan \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 .\n *\n */\n\nimport Vue from 'vue'\nimport { getRequestToken } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\nimport '@nextcloud/dialogs/dist/index.css'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport AdminSettings from './components/AdminSettings'\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","__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 = 7220;","__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\t7220: 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));","__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, [7874], function() { return __webpack_require__(96441); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","_vm","this","_c","_self","attrs","t","sharingFederatedDocUrl","outgoingServer2serverShareEnabled","on","$event","update","_v","_s","incomingServer2serverShareEnabled","federatedGroupSharingSupported","outgoingServer2serverGroupShareEnabled","_e","incomingServer2serverGroupShareEnabled","lookupServerEnabled","lookupServerUploadEnabled","__webpack_nonce__","btoa","getRequestToken","Vue","methods","loadState","AdminSettings","$mount","__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","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","window","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","push","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"federatedfilesharing-vue-settings-admin.js?v=6a7e5f08e5c0866db589","mappings":";6BAAIA,0fCiFJ,ICjFyL,EDiFzL,CACA,qBAEA,YACA,0BACA,uBAGA,gBACA,OACA,8GACA,8GACA,wHACA,wHACA,wGACA,kFACA,8FACA,oEACA,wFAEA,EACA,SACA,gMACA,8BAOA,OALA,kFACA,sBACA,QAGA,iCAEA,kBACA,UACA,gBAFA,SAGA,kBACA,qFACA,kDAEA,kBACA,yFACA,aACA,yDApBA,EAsBA,EACA,0MACA,YACA,WACA,cACA,0CAJA,EAKA,IEjHA,GAXgB,cACd,GCRW,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,oBAAoB,CAACE,MAAM,CAAC,MAAQJ,EAAIK,EAAE,uBAAwB,2BAA2B,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AS/D,GAAM,OAA+B,IAAxBwD,EAAgBxD,EAAW,IAAI,CACrE,IAAIL,KAAYkE,EACZnE,EAAoBqC,EAAE8B,EAAalE,KACrCD,EAAoBU,EAAET,GAAYkE,EAAYlE,IAGhD,GAAGmE,EAAS,IAAIrD,EAASqD,EAAQpE,EAClC,CAEA,IADGiE,GAA4BA,EAA2BC,GACrD7C,EAAIL,EAASM,OAAQD,IACzB0C,EAAU/C,EAASK,GAChBrB,EAAoBqC,EAAEyB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO/D,EAAoBc,EAAEC,EAC9B,EAEIuD,EAAqBX,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FW,EAAmBC,QAAQP,EAAqBQ,KAAK,KAAM,IAC3DF,EAAmBG,KAAOT,EAAqBQ,KAAK,KAAMF,EAAmBG,KAAKD,KAAKF,OClDvFtE,EAAoB0E,QAAKvE,ECGzB,IAAIwE,EAAsB3E,EAAoBc,OAAEX,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,MAAQ,IACnH2E,EAAsB3E,EAAoBc,EAAE6D","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","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/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/runtime/nonce","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};","\n\n\n\t\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to receive shares from other servers') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to send shares to groups on other servers') }}\n\t\t\n\n\t\t\n\t\t\t{{ t('federatedfilesharing', 'Allow users on this server to receive group shares from other servers') }}\n\t\t\n\n\t\t\n\t\n\n\n\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=e3db758a\"\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:{\"title\":_vm.t('federatedfilesharing', 'Federated Cloud Sharing'),\"description\":_vm.t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between users 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 users 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 users 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 users 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 users 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 users'))+\"\\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 users 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 \n *\n * @author Carl Schwan \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 .\n *\n */\n\nimport Vue from 'vue'\nimport { getRequestToken } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\nimport '@nextcloud/dialogs/dist/index.css'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport AdminSettings from './components/AdminSettings'\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","__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 = 7220;","__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\t7220: 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));","__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, [7874], function() { return __webpack_require__(97553); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","_vm","this","_c","_self","attrs","t","sharingFederatedDocUrl","outgoingServer2serverShareEnabled","on","$event","update","_v","_s","incomingServer2serverShareEnabled","federatedGroupSharingSupported","outgoingServer2serverGroupShareEnabled","_e","incomingServer2serverGroupShareEnabled","lookupServerEnabled","lookupServerUploadEnabled","__webpack_nonce__","btoa","getRequestToken","Vue","methods","loadState","AdminSettings","$mount","__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","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","window","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","push","nc","__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 72cbfd4de4b88..34113aa0c3ee7 100644
--- a/lib/private/Collaboration/Collaborators/LookupPlugin.php
+++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php
@@ -64,12 +64,14 @@ public function __construct(IConfig $config,
}
public function search($search, $limit, $offset, ISearchResult $searchResult) {
- $isGlobalScaleEnabled = $this->config->getSystemValue('gs.enabled', false);
- $isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes';
+ $isGlobalScaleEnabled = $this->config->getSystemValueBool('gs.enabled', false);
+ $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 b52e1d2745e6a..a61c1186c6f2d 100644
--- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
@@ -88,24 +88,20 @@ protected function setUp(): void {
}
public function testSearchNoLookupServerURI() {
- $this->config->expects($this->once())
+ $this->config->expects($this->atMost(1))
->method('getAppValue')
- ->with('files_sharing', 'lookupServerEnabled', 'yes')
+ ->with('files_sharing', 'lookupServerEnabled', 'no')
->willReturn('yes');
$this->config->expects($this->exactly(2))
- ->method('getSystemValue')
- ->withConsecutive(
- ['gs.enabled', false],
- ['lookup_server', 'https://lookup.nextcloud.com'],
- )->willReturnOnConsecutiveCalls(
- false,
- '',
- );
-
- $this->config->expects($this->once())
->method('getSystemValueBool')
- ->with('has_internet_connection', true)
- ->willReturn(true);
+ ->willReturnMap([
+ ['gs.enabled', false, true],
+ ['has_internet_connection', true, true],
+ ]);
+ $this->config->expects($this->once())
+ ->method('getSystemValue')
+ ->with('lookup_server', 'https://lookup.nextcloud.com')
+ ->willReturn('');
$this->clientService->expects($this->never())
->method('newClient');
@@ -119,17 +115,15 @@ public function testSearchNoLookupServerURI() {
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->once())
- ->method('getSystemValue')
- ->with('gs.enabled', false)
- ->willReturn(false);
- $this->config->expects($this->once())
+ $this->config->expects($this->exactly(2))
->method('getSystemValueBool')
- ->with('has_internet_connection', true)
- ->willReturn(false);
+ ->willReturnMap([
+ ['has_internet_connection', true, false],
+ ['gs.enabled', false, true],
+ ]);
$this->clientService->expects($this->never())
->method('newClient');
@@ -155,22 +149,18 @@ public function testSearch(array $searchParams) {
$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('getSystemValue')
- ->withConsecutive(
- ['gs.enabled', false],
- ['lookup_server', 'https://lookup.nextcloud.com'],
- )->willReturnOnConsecutiveCalls(
- false,
- $searchParams['server'],
- );
-
$this->config->expects($this->once())
+ ->method('getSystemValue')
+ ->with('lookup_server', 'https://lookup.nextcloud.com')
+ ->willReturn($searchParams['server']);
+ $this->config->expects($this->exactly(2))
->method('getSystemValueBool')
- ->with('has_internet_connection', true)
- ->willReturn(true);
+ ->willReturnMap([
+ ['gs.enabled', false, true],
+ ['has_internet_connection', true, true],
+ ]);
$response = $this->createMock(IResponse::class);
$response->expects($this->once())
@@ -215,26 +205,24 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab
$this->config->expects($this->once())
->method('getAppValue')
- ->with('files_sharing', 'lookupServerEnabled', 'yes')
+ ->with('files_sharing', 'lookupServerEnabled', 'no')
->willReturn($LookupEnabled ? 'yes' : 'no');
- if ($GSEnabled || $LookupEnabled) {
+
+ $this->config->expects($this->exactly(2))
+ ->method('getSystemValueBool')
+ ->willReturnMap([
+ ['has_internet_connection', true, true],
+ ['gs.enabled', false, $GSEnabled],
+ ]);
+ if ($GSEnabled) {
$searchResult->expects($this->once())
->method('addResultSet')
->with($type, $searchParams['expectedResult'], []);
$this->config->expects($this->once())
- ->method('getSystemValueBool')
- ->with('has_internet_connection', true)
- ->willReturn(true);
- $this->config->expects($this->exactly(2))
->method('getSystemValue')
- ->withConsecutive(
- ['gs.enabled', false],
- ['lookup_server', 'https://lookup.nextcloud.com'],
- )->willReturnOnConsecutiveCalls(
- $GSEnabled,
- $searchParams['server'],
- );
+ ->with('lookup_server', 'https://lookup.nextcloud.com')
+ ->willReturn($searchParams['server']);
$response = $this->createMock(IResponse::class);
$response->expects($this->once())
@@ -255,10 +243,6 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab
->willReturn($client);
} else {
$searchResult->expects($this->never())->method('addResultSet');
- $this->config->expects($this->once())
- ->method('getSystemValue')
- ->with('gs.enabled', false)
- ->willReturn($GSEnabled);
}
$moreResults = $this->plugin->search(
$searchParams['search'],
@@ -270,12 +254,13 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab
$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);
@@ -394,7 +379,6 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[0],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
- 'globalScale' => false,
'shareWith' => $fedIDs[0]
],
'extra' => ['federationId' => $fedIDs[0]],
@@ -403,7 +387,6 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[1],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
- 'globalScale' => false,
'shareWith' => $fedIDs[1]
],
'extra' => ['federationId' => $fedIDs[1]],
@@ -412,7 +395,6 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[2],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
- 'globalScale' => false,
'shareWith' => $fedIDs[2]
],
'extra' => ['federationId' => $fedIDs[2]],
@@ -487,7 +469,7 @@ public function searchDataProvider() {
'label' => $fedIDs[0],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
- 'globalScale' => false,
+ 'globalScale' => true,
'shareWith' => $fedIDs[0]
],
'extra' => ['federationId' => $fedIDs[0]],
@@ -496,7 +478,7 @@ public function searchDataProvider() {
'label' => $fedIDs[1],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
- 'globalScale' => false,
+ 'globalScale' => true,
'shareWith' => $fedIDs[1]
],
'extra' => ['federationId' => $fedIDs[1]],
@@ -505,7 +487,7 @@ public function searchDataProvider() {
'label' => $fedIDs[2],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
- 'globalScale' => false,
+ 'globalScale' => true,
'shareWith' => $fedIDs[2]
],
'extra' => ['federationId' => $fedIDs[2]],