nextcloud/apps/files_sharing/tests
Daniel Calviño Sánchez 6cb2cb33ac Fix getting the information of group share as a sharee
When the receiver of a group share modifies it (for example, by moving
it to a different folder) the original share is not modified, but a
"ghost" share that keeps track of the changes made by that specific user
is used instead.

By default, the method "getShareById" in the share provider returns the
share from the point of view of the sharer, but it can be used too to
get the share from the point of view of a sharee by providing the
"recipient" parameter (and if the sharee is not found then the share is
returned from the point of view of the sharer).

The "ShareAPIController" always formats the share from the point of view
of the current user, but when getting the information of a specific
share the "recipient" parameter was not given, so it was always returned
from the point of view of the sharer, even if the current user was a
sharee. Now the "recipient" parameter is set to the current user, and
thus the information of the share is returned from the point of view of
the current user, be it the sharer or a sharee.

Note that this special behaviour of "getShareById" happens only with
group shares; with other types of shares the share is the same for the
sharer and the sharee, and thus the parameter is ignored; it was added
for them too just for consistency.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-29 08:20:19 +02:00
..
Collaboration fix sharerecipientssorter tests 2017-10-27 16:03:37 +02:00
Command Update license headers 2017-11-06 16:56:19 +01:00
Controller Fix getting the information of group share as a sharee 2018-06-29 08:20:19 +02:00
External Fix risky tests without assertions 2018-01-25 11:33:25 +01:00
js Fix tests 2018-05-01 15:20:20 +02:00
Middleware Update SharingCheckMiddlewareTest 2018-06-20 08:53:37 +02:00
Migration Update license headers 2017-11-06 16:56:19 +01:00
ApiTest.php fix unit tests 2018-02-27 12:29:25 +01:00
BackendTest.php Update license headers 2017-11-06 16:56:19 +01:00
CacheTest.php Cleanup OC_User and OCP\User 2018-01-16 18:39:11 +01:00
CapabilitiesTest.php Update license headers 2017-11-06 16:56:19 +01:00
DeleteOrphanedSharesJobTest.php Use node api 2018-05-23 19:10:11 +02:00
EncryptedSizePropagationTest.php Update license headers 2017-11-06 16:56:19 +01:00
EtagPropagationTest.php Generate coverage for quick DB tests 2016-10-05 13:55:44 +02:00
ExpireSharesJobTest.php Fix ExpiresSharesJobTest 2018-05-23 19:12:02 +02:00
ExternalStorageTest.php Update license headers 2017-11-06 16:56:19 +01:00
GroupEtagPropagationTest.php Update license headers 2017-11-06 16:56:19 +01:00
HelperTest.php Update license headers 2017-11-06 16:56:19 +01:00
LockingTest.php Fix risky tests without assertions 2018-01-25 11:33:25 +01:00
MountProviderTest.php Update license headers 2017-11-06 16:56:19 +01:00
PermissionsTest.php Update with robin 2016-07-21 18:13:58 +02:00
PropagationTestCase.php Update with robin 2016-07-21 18:13:58 +02:00
SharedMountTest.php Update license headers 2017-11-06 16:56:19 +01:00
SharedStorageTest.php Cleanup unused methods 2017-08-15 14:29:26 +02:00
ShareTest.php Do not use \OCP\DB anymore 2018-03-26 14:40:23 +02:00
SizePropagationTest.php Some app fixes of phpstorm inspections 2017-07-24 11:42:07 +02:00
TestCase.php Do not use \OCP\DB anymore 2018-03-26 14:40:23 +02:00
UnshareChildrenTest.php Some app fixes of phpstorm inspections 2017-07-24 11:42:07 +02:00
UpdaterTest.php Remove OC_App::disable method 2018-03-06 10:45:20 +01:00
WatcherTest.php Update with robin 2016-07-21 18:13:58 +02:00