diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-19 09:20:35 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-05 12:43:56 +0200 |
commit | d805959e819e64ccf47dfa55fca96b222dedfa9a (patch) | |
tree | 69762a89ab4b3db870a33a72d20a809bf8eaa3df /lib/public/Share/IShareProvider.php | |
parent | 86d9528bc93402a18a3202bb3ff17c812b94402e (diff) | |
download | nextcloud-server-d805959e819e64ccf47dfa55fca96b222dedfa9a.tar.gz nextcloud-server-d805959e819e64ccf47dfa55fca96b222dedfa9a.zip |
Add API to undelete delete group shares
When a group share is deleted we keep track of this in the DB.
Right now it is only possible for a recipient to get back the share by
asking the sharer to delete it and to share it again. This doesn't
scale.
This endpoint makes it possible to get back the share.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/Share/IShareProvider.php')
-rw-r--r-- | lib/public/Share/IShareProvider.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index 4a1ac9b8b8d..6731bf8882b 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -25,6 +25,8 @@ namespace OCP\Share; use OCP\Files\Folder; +use OCP\Share\Exceptions\GenericShareException; +use OCP\Share\Exceptions\ShareNotFound; use OCP\Files\Node; /** @@ -81,6 +83,18 @@ interface IShareProvider { public function deleteFromSelf(\OCP\Share\IShare $share, $recipient); /** + * Restore a share for a given recipient. The implementation could be provider independant. + * + * @param IShare $share + * @param string $recipient + * @return IShare The restored share object + * + * @since 14.0.0 + * @throws GenericShareException In case the share could not be restored + */ + public function restore(IShare $share, string $recipient): IShare; + + /** * Move a share as a recipient. * This is updating the share target. Thus the mount point of the recipient. * This may require special handling. If a user moves a group share |