diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-29 10:07:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-02 10:41:57 +0100 |
commit | 403547f0ea9f34b82fa0ea5e9d7ebc1144ffa0e7 (patch) | |
tree | 21cf2f654f4a368b50fa7c7ac10a88777d545b69 /lib/public | |
parent | 4777f78187cb758413db1b11f11ccb9304f12482 (diff) | |
download | nextcloud-server-403547f0ea9f34b82fa0ea5e9d7ebc1144ffa0e7.tar.gz nextcloud-server-403547f0ea9f34b82fa0ea5e9d7ebc1144ffa0e7.zip |
[Share 2.0] Allow recipient to be passed in to getShareById
* This allows us to retrieve usergroup shares for a given id.
If the user deleted a share or moved it this will be a different share
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share/imanager.php | 10 | ||||
-rw-r--r-- | lib/public/share/ishareprovider.php | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/public/share/imanager.php b/lib/public/share/imanager.php index b2d9953e9ef..6919fea00de 100644 --- a/lib/public/share/imanager.php +++ b/lib/public/share/imanager.php @@ -101,14 +101,18 @@ interface IManager { public function getSharedWith(IUser $user, $shareType, $node = null, $limit = 50, $offset = 0); /** - * Retrieve a share by the share id + * Retrieve a share by the share id. + * If the recipient is set make sure to retrieve the file for that user. + * This makes sure that if a user has moved/deleted a group share this + * is reflected. * * @param string $id - * @return Share + * @param IUser|null $recipient + * @return IShare * @throws ShareNotFound * @since 9.0.0 */ - public function getShareById($id); + public function getShareById($id, $recipient = null); /** * Get the share by token possible with password diff --git a/lib/public/share/ishareprovider.php b/lib/public/share/ishareprovider.php index 8507462cbed..9dc56dc37ad 100644 --- a/lib/public/share/ishareprovider.php +++ b/lib/public/share/ishareprovider.php @@ -97,11 +97,12 @@ interface IShareProvider { * Get share by id * * @param int $id + * @param IUser|null $recipient * @return \OCP\Share\IShare * @throws ShareNotFound * @since 9.0.0 */ - public function getShareById($id); + public function getShareById($id, $recipient = null); /** * Get shares for a given path |