Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
01a85a98
Commit
01a85a98
authored
8 years ago
by
Morris Jobke
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1876 from nextcloud/shareesAPI_email
Add ShareesAPI E-mail search
parents
c0adc3c2
a28528a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_sharing/lib/Controller/ShareesAPIController.php
+70
-0
70 additions, 0 deletions
apps/files_sharing/lib/Controller/ShareesAPIController.php
apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
+244
-12
244 additions, 12 deletions
...les_sharing/tests/Controller/ShareesAPIControllerTest.php
with
314 additions
and
12 deletions
apps/files_sharing/lib/Controller/ShareesAPIController.php
+
70
−
0
View file @
01a85a98
...
@@ -83,10 +83,12 @@ class ShareesAPIController extends OCSController {
...
@@ -83,10 +83,12 @@ class ShareesAPIController extends OCSController {
'users'
=>
[],
'users'
=>
[],
'groups'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'remotes'
=>
[],
'emails'
=>
[],
],
],
'users'
=>
[],
'users'
=>
[],
'groups'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'remotes'
=>
[],
'emails'
=>
[],
];
];
protected
$reachedEndFor
=
[];
protected
$reachedEndFor
=
[];
...
@@ -402,6 +404,68 @@ class ShareesAPIController extends OCSController {
...
@@ -402,6 +404,68 @@ class ShareesAPIController extends OCSController {
return
$remote
;
return
$remote
;
}
}
/**
* @param string $search
*/
protected
function
getEmails
(
$search
)
{
$this
->
result
[
'emails'
]
=
[];
$this
->
result
[
'exact'
][
'emails'
]
=
[];
$foundEmail
=
false
;
// Search in contacts
//@todo Pagination missing
$addressBookContacts
=
$this
->
contactsManager
->
search
(
$search
,
[
'FN'
,
'EMAIL'
]);
foreach
(
$addressBookContacts
as
$contact
)
{
if
(
!
isset
(
$contact
[
'EMAIL'
]))
{
continue
;
}
$emails
=
$contact
[
'EMAIL'
];
if
(
!
is_array
(
$emails
))
{
$emails
=
[
$emails
];
}
foreach
(
$emails
as
$email
)
{
if
(
strtolower
(
$search
)
===
strtolower
(
$contact
[
'FN'
])
||
strtolower
(
$search
)
===
strtolower
(
$email
)
)
{
if
(
strtolower
(
$search
)
===
strtolower
(
$email
))
{
$foundEmail
=
true
;
}
$this
->
result
[
'exact'
][
'emails'
][]
=
[
'label'
=>
$contact
[
'FN'
],
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
$email
,
],
];
}
else
if
(
$this
->
shareeEnumeration
)
{
$this
->
result
[
'emails'
][]
=
[
'label'
=>
$contact
[
'FN'
],
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
$email
,
],
];
}
}
}
if
(
!
$foundEmail
&&
substr_count
(
$search
,
'@'
)
>=
1
&&
$this
->
offset
===
0
)
{
$this
->
result
[
'exact'
][
'emails'
][]
=
[
'label'
=>
$search
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
$search
,
],
];
}
$this
->
reachedEndFor
[]
=
'emails'
;
}
/**
/**
* @NoAdminRequired
* @NoAdminRequired
*
*
...
@@ -429,6 +493,7 @@ class ShareesAPIController extends OCSController {
...
@@ -429,6 +493,7 @@ class ShareesAPIController extends OCSController {
$shareTypes
[]
=
Share
::
SHARE_TYPE_GROUP
;
$shareTypes
[]
=
Share
::
SHARE_TYPE_GROUP
;
}
}
$shareTypes
[]
=
Share
::
SHARE_TYPE_EMAIL
;
$shareTypes
[]
=
Share
::
SHARE_TYPE_REMOTE
;
$shareTypes
[]
=
Share
::
SHARE_TYPE_REMOTE
;
if
(
is_array
(
$shareType
))
{
if
(
is_array
(
$shareType
))
{
...
@@ -499,6 +564,11 @@ class ShareesAPIController extends OCSController {
...
@@ -499,6 +564,11 @@ class ShareesAPIController extends OCSController {
$this
->
getRemote
(
$search
);
$this
->
getRemote
(
$search
);
}
}
// Get email
if
(
in_array
(
Share
::
SHARE_TYPE_EMAIL
,
$shareTypes
))
{
$this
->
getEmails
(
$search
);
}
$response
=
new
Http\DataResponse
(
$this
->
result
);
$response
=
new
Http\DataResponse
(
$this
->
result
);
if
(
sizeof
(
$this
->
reachedEndFor
)
<
3
)
{
if
(
sizeof
(
$this
->
reachedEndFor
)
<
3
)
{
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
+
244
−
12
View file @
01a85a98
...
@@ -39,7 +39,7 @@ use OCP\Share;
...
@@ -39,7 +39,7 @@ use OCP\Share;
* @package OCA\Files_Sharing\Tests\API
* @package OCA\Files_Sharing\Tests\API
*/
*/
class
ShareesAPIControllerTest
extends
TestCase
{
class
ShareesAPIControllerTest
extends
TestCase
{
/** @var Sharees */
/** @var Sharees
APIController
*/
protected
$sharees
;
protected
$sharees
;
/** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
/** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
...
@@ -1025,8 +1025,234 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1025,8 +1025,234 @@ class ShareesAPIControllerTest extends TestCase {
$this
->
assertCount
((
int
)
$reachedEnd
,
$this
->
invokePrivate
(
$this
->
sharees
,
'reachedEndFor'
));
$this
->
assertCount
((
int
)
$reachedEnd
,
$this
->
invokePrivate
(
$this
->
sharees
,
'reachedEndFor'
));
}
}
public
function
dataGetEmails
()
{
return
[
[
'test'
,
[],
true
,
[],
[],
true
],
[
'test'
,
[],
false
,
[],
[],
true
],
[
'test@remote.com'
,
[],
true
,
[
[
'label'
=>
'test@remote.com'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'test@remote.com'
]],
],
[],
true
,
],
[
'test@remote.com'
,
[],
false
,
[
[
'label'
=>
'test@remote.com'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'test@remote.com'
]],
],
[],
true
,
],
[
'test'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
[
'username@localhost.com'
,
],
],
],
true
,
[],
[
[
'label'
=>
'User @ Localhost'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'username@localhost.com'
]],
],
true
,
],
[
'test'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
[
'username@localhost.com'
,
],
],
],
false
,
[],
[],
true
,
],
[
'test@remote.com'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
[
'username@localhost.com'
,
],
],
],
true
,
[
[
'label'
=>
'test@remote.com'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'test@remote.com'
]],
],
[
[
'label'
=>
'User @ Localhost'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'username@localhost.com'
]],
],
true
,
],
[
'test@remote.com'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
[
'username@localhost.com'
,
],
],
],
false
,
[
[
'label'
=>
'test@remote.com'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'test@remote.com'
]],
],
[],
true
,
],
[
'username@localhost.com'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
[
'username@localhost.com'
,
],
],
],
true
,
[
[
'label'
=>
'User @ Localhost'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'username@localhost.com'
]],
],
[],
true
,
],
[
'username@localhost.com'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
[
'username@localhost.com'
,
],
],
],
false
,
[
[
'label'
=>
'User @ Localhost'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'username@localhost.com'
]],
],
[],
true
,
],
// Test single email
[
'username@localhost.com'
,
[
[
'FN'
=>
'User3 @ Localhost'
,
],
[
'FN'
=>
'User2 @ Localhost'
,
'EMAIL'
=>
[
],
],
[
'FN'
=>
'User @ Localhost'
,
'EMAIL'
=>
'username@localhost.com'
,
],
],
false
,
[
[
'label'
=>
'User @ Localhost'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_EMAIL
,
'shareWith'
=>
'username@localhost.com'
]],
],
[],
true
,
],
];
}
/**
* @dataProvider dataGetEmails
*
* @param string $searchTerm
* @param array $contacts
* @param bool $shareeEnumeration
* @param array $exactExpected
* @param array $expected
* @param bool $reachedEnd
*/
public
function
testGetEmails
(
$searchTerm
,
$contacts
,
$shareeEnumeration
,
$exactExpected
,
$expected
,
$reachedEnd
)
{
$this
->
invokePrivate
(
$this
->
sharees
,
'shareeEnumeration'
,
[
$shareeEnumeration
]);
$this
->
contactsManager
->
expects
(
$this
->
any
())
->
method
(
'search'
)
->
with
(
$searchTerm
,
[
'FN'
,
'EMAIL'
])
->
willReturn
(
$contacts
);
$this
->
invokePrivate
(
$this
->
sharees
,
'getEmails'
,
[
$searchTerm
]);
$result
=
$this
->
invokePrivate
(
$this
->
sharees
,
'result'
);
$this
->
assertEquals
(
$exactExpected
,
$result
[
'exact'
][
'emails'
]);
$this
->
assertEquals
(
$expected
,
$result
[
'emails'
]);
$this
->
assertCount
((
int
)
$reachedEnd
,
$this
->
invokePrivate
(
$this
->
sharees
,
'reachedEndFor'
));
}
public
function
dataSearch
()
{
public
function
dataSearch
()
{
$allTypes
=
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
];
$allTypes
=
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_EMAIL
,
Share
::
SHARE_TYPE_REMOTE
];
return
[
return
[
[[],
''
,
'yes'
,
true
,
''
,
null
,
$allTypes
,
1
,
200
,
false
,
true
,
true
],
[[],
''
,
'yes'
,
true
,
''
,
null
,
$allTypes
,
1
,
200
,
false
,
true
,
true
],
...
@@ -1082,13 +1308,13 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1082,13 +1308,13 @@ class ShareesAPIControllerTest extends TestCase {
],
''
,
'yes'
,
true
,
''
,
null
,
$allTypes
,
1
,
200
,
false
,
true
,
true
],
],
''
,
'yes'
,
true
,
''
,
null
,
$allTypes
,
1
,
200
,
false
,
true
,
true
],
[[
[[
'shareType'
=>
$allTypes
,
'shareType'
=>
$allTypes
,
],
''
,
'yes'
,
false
,
''
,
null
,
[
0
,
1
],
1
,
200
,
false
,
true
,
true
],
],
''
,
'yes'
,
false
,
''
,
null
,
[
0
,
1
,
4
],
1
,
200
,
false
,
true
,
true
],
[[
[[
'shareType'
=>
$allTypes
,
'shareType'
=>
$allTypes
,
],
''
,
'yes'
,
true
,
''
,
null
,
[
0
,
6
],
1
,
200
,
false
,
true
,
false
],
],
''
,
'yes'
,
true
,
''
,
null
,
[
0
,
4
,
6
],
1
,
200
,
false
,
true
,
false
],
[[
[[
'shareType'
=>
$allTypes
,
'shareType'
=>
$allTypes
,
],
''
,
'yes'
,
false
,
''
,
null
,
[
0
],
1
,
200
,
false
,
true
,
false
],
],
''
,
'yes'
,
false
,
''
,
null
,
[
0
,
4
],
1
,
200
,
false
,
true
,
false
],
// Test pagination
// Test pagination
[[
[[
...
@@ -1195,7 +1421,7 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1195,7 +1421,7 @@ class ShareesAPIControllerTest extends TestCase {
->
with
(
$itemType
)
->
with
(
$itemType
)
->
willReturn
(
$remoteSharingEnabled
);
->
willReturn
(
$remoteSharingEnabled
);
$this
->
assertInstanceOf
(
'\OCP\AppFramework\
Http\DataResponse
'
,
$sharees
->
search
(
$search
,
$itemType
,
$page
,
$perPage
,
$shareType
));
$this
->
assertInstanceOf
(
Http\DataResponse
::
class
,
$sharees
->
search
(
$search
,
$itemType
,
$page
,
$perPage
,
$shareType
));
$this
->
assertSame
(
$shareWithGroupOnly
,
$this
->
invokePrivate
(
$sharees
,
'shareWithGroupOnly'
));
$this
->
assertSame
(
$shareWithGroupOnly
,
$this
->
invokePrivate
(
$sharees
,
'shareWithGroupOnly'
));
$this
->
assertSame
(
$shareeEnumeration
,
$this
->
invokePrivate
(
$sharees
,
'shareeEnumeration'
));
$this
->
assertSame
(
$shareeEnumeration
,
$this
->
invokePrivate
(
$sharees
,
'shareeEnumeration'
));
...
@@ -1295,17 +1521,19 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1295,17 +1521,19 @@ class ShareesAPIControllerTest extends TestCase {
return
[
return
[
[
'test'
,
'folder'
,
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
],
1
,
2
,
false
,
[],
[],
[],
[
'test'
,
'folder'
,
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
],
1
,
2
,
false
,
[],
[],
[],
[
[
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[]],
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'emails'
=>
[]],
'users'
=>
[],
'users'
=>
[],
'groups'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'remotes'
=>
[],
'emails'
=>
[],
],
false
],
],
false
],
[
'test'
,
'folder'
,
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
],
1
,
2
,
false
,
[],
[],
[],
[
'test'
,
'folder'
,
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
],
1
,
2
,
false
,
[],
[],
[],
[
[
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[]],
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'emails'
=>
[]],
'users'
=>
[],
'users'
=>
[],
'groups'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'remotes'
=>
[],
'emails'
=>
[],
],
false
],
],
false
],
[
[
'test'
,
'folder'
,
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
],
1
,
2
,
false
,
[
'test'
,
'folder'
,
[
Share
::
SHARE_TYPE_USER
,
Share
::
SHARE_TYPE_GROUP
,
Share
::
SHARE_TYPE_REMOTE
],
1
,
2
,
false
,
[
...
@@ -1316,7 +1544,7 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1316,7 +1544,7 @@ class ShareesAPIControllerTest extends TestCase {
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
],
],
[
[
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[]],
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'emails'
=>
[]],
'users'
=>
[
'users'
=>
[
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
],
],
...
@@ -1326,6 +1554,7 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1326,6 +1554,7 @@ class ShareesAPIControllerTest extends TestCase {
'remotes'
=>
[
'remotes'
=>
[
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
],
],
'emails'
=>
[],
],
true
,
],
true
,
],
],
// No groups requested
// No groups requested
...
@@ -1336,7 +1565,7 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1336,7 +1565,7 @@ class ShareesAPIControllerTest extends TestCase {
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
],
],
[
[
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[]],
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'emails'
=>
[]],
'users'
=>
[
'users'
=>
[
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
],
],
...
@@ -1344,6 +1573,7 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1344,6 +1573,7 @@ class ShareesAPIControllerTest extends TestCase {
'remotes'
=>
[
'remotes'
=>
[
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
[
'label'
=>
'testz@remote'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_REMOTE
,
'shareWith'
=>
'testz@remote'
]],
],
],
'emails'
=>
[],
],
false
,
],
false
,
],
],
// Share type restricted to user - Only one user
// Share type restricted to user - Only one user
...
@@ -1352,12 +1582,13 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1352,12 +1582,13 @@ class ShareesAPIControllerTest extends TestCase {
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
],
null
,
null
,
],
null
,
null
,
[
[
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[]],
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'emails'
=>
[]],
'users'
=>
[
'users'
=>
[
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
[
'label'
=>
'test One'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
],
],
'groups'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'remotes'
=>
[],
'emails'
=>
[],
],
false
,
],
false
,
],
],
// Share type restricted to user - Multipage result
// Share type restricted to user - Multipage result
...
@@ -1367,13 +1598,14 @@ class ShareesAPIControllerTest extends TestCase {
...
@@ -1367,13 +1598,14 @@ class ShareesAPIControllerTest extends TestCase {
[
'label'
=>
'test 2'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test2'
]],
[
'label'
=>
'test 2'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test2'
]],
],
null
,
null
,
],
null
,
null
,
[
[
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[]],
'exact'
=>
[
'users'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'emails'
=>
[]],
'users'
=>
[
'users'
=>
[
[
'label'
=>
'test 1'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
[
'label'
=>
'test 1'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test1'
]],
[
'label'
=>
'test 2'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test2'
]],
[
'label'
=>
'test 2'
,
'value'
=>
[
'shareType'
=>
Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
'test2'
]],
],
],
'groups'
=>
[],
'groups'
=>
[],
'remotes'
=>
[],
'remotes'
=>
[],
'emails'
=>
[],
],
true
,
],
true
,
],
],
];
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment