From d805959e819e64ccf47dfa55fca96b222dedfa9a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 19 Jun 2018 09:20:35 +0200 Subject: 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 --- lib/public/Share/IShareProvider.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/public/Share/IShareProvider.php') 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; /** @@ -80,6 +82,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. -- cgit v1.2.3