Skip to content

Commit

Permalink
Merge pull request #31940 from nextcloud/backport/31907/stable23
Browse files Browse the repository at this point in the history
[stable23] confirm user is internal to globalscale
  • Loading branch information
PVince81 authored Apr 13, 2022
2 parents ce44d15 + 7e31403 commit 0444c15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Collaboration/Collaborators/LookupPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
'label' => $label,
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => $isGlobalScaleEnabled,
'shareWith' => $lookup['federationId'],
],
'extra' => $lookup,
Expand Down
12 changes: 12 additions & 0 deletions tests/lib/Collaboration/Collaborators/LookupPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[0],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => true,
'shareWith' => $fedIDs[0]
],
'extra' => ['federationId' => $fedIDs[0]],
Expand All @@ -311,6 +312,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[1],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => true,
'shareWith' => $fedIDs[1]
],
'extra' => ['federationId' => $fedIDs[1]],
Expand All @@ -319,6 +321,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[2],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => true,
'shareWith' => $fedIDs[2]
],
'extra' => ['federationId' => $fedIDs[2]],
Expand All @@ -342,6 +345,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[0],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => true,
'shareWith' => $fedIDs[0]
],
'extra' => ['federationId' => $fedIDs[0]],
Expand All @@ -350,6 +354,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[1],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => true,
'shareWith' => $fedIDs[1]
],
'extra' => ['federationId' => $fedIDs[1]],
Expand All @@ -358,6 +363,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[2],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => true,
'shareWith' => $fedIDs[2]
],
'extra' => ['federationId' => $fedIDs[2]],
Expand All @@ -381,6 +387,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[0],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => false,
'shareWith' => $fedIDs[0]
],
'extra' => ['federationId' => $fedIDs[0]],
Expand All @@ -389,6 +396,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[1],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => false,
'shareWith' => $fedIDs[1]
],
'extra' => ['federationId' => $fedIDs[1]],
Expand All @@ -397,6 +405,7 @@ public function dataSearchEnableDisableLookupServer() {
'label' => $fedIDs[2],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => false,
'shareWith' => $fedIDs[2]
],
'extra' => ['federationId' => $fedIDs[2]],
Expand Down Expand Up @@ -471,6 +480,7 @@ public function searchDataProvider() {
'label' => $fedIDs[0],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => false,
'shareWith' => $fedIDs[0]
],
'extra' => ['federationId' => $fedIDs[0]],
Expand All @@ -479,6 +489,7 @@ public function searchDataProvider() {
'label' => $fedIDs[1],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => false,
'shareWith' => $fedIDs[1]
],
'extra' => ['federationId' => $fedIDs[1]],
Expand All @@ -487,6 +498,7 @@ public function searchDataProvider() {
'label' => $fedIDs[2],
'value' => [
'shareType' => IShare::TYPE_REMOTE,
'globalScale' => false,
'shareWith' => $fedIDs[2]
],
'extra' => ['federationId' => $fedIDs[2]],
Expand Down

0 comments on commit 0444c15

Please sign in to comment.