nextcloud/apps/files_sharing/lib
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
..
Activity Update message shown when unsharing a file 2018-06-18 13:12:23 +03:00
AppInfo Use ::class statement instead of string 2018-01-29 12:03:47 +01:00
BackgroundJob Add background job to refresh federated discovery 2018-04-18 19:20:26 +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
Exceptions Fix apps/ 2016-07-21 18:13:57 +02:00
External Use an actual function of the storage to determine needsPartFile 2018-05-01 15:02:36 +02:00
Middleware Don't allow public share pages if link sharing is disabled 2018-06-20 08:53:37 +02:00
Migration Fix array method usages with a proper call 2018-01-25 22:20:10 +01:00
ShareBackend Less deprecated calls to OCP\Util::writeLog 2018-04-22 20:41:49 +02:00
Cache.php delay calculating the shared cache root until it's used 2017-12-04 15:16:39 +01:00
Capabilities.php add share permissions to settings page 2018-02-27 12:29:25 +01:00
DeleteOrphanedSharesJob.php Fix apps/ 2016-07-21 18:13:57 +02:00
ExpireSharesJob.php Update license headers 2017-11-06 16:56:19 +01:00
Helper.php Remove unused static sharing helper code 2018-02-27 22:40:59 +01:00
Hooks.php Use ::class statement instead of string 2018-01-29 12:03:47 +01:00
ISharedStorage.php Update with robin 2016-07-21 18:13:58 +02:00
MountProvider.php Update license headers 2017-11-06 16:56:19 +01:00
Scanner.php Update license headers 2017-11-06 16:56:19 +01:00
SharedMount.php Less deprecated calls to OCP\Util::writeLog 2018-04-22 20:41:49 +02:00
SharedStorage.php Update license headers 2017-11-06 16:56:19 +01:00
Updater.php Use ::class statement instead of string 2018-01-29 12:03:47 +01:00