nextcloud/apps/files_sharing/lib/Controller
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
..
ExternalSharesController.php Move files_sharing Controllers => Controller 2016-10-24 11:46:25 +02:00
PublicPreviewController.php Move public preview endpoint over 2018-06-20 08:53:37 +02:00
RemoteController.php Update license headers 2017-11-06 16:56:19 +01:00
ShareAPIController.php Fix getting the information of group share as a sharee 2018-06-29 08:20:19 +02:00
ShareController.php Fix ShareControllerTest 2018-06-20 08:53:37 +02:00
ShareInfoController.php Remove unused import statements 2018-02-14 16:55:43 +01:00
ShareesAPIController.php Make ShareesAPIController strict 2018-04-23 22:05:21 +02:00