summaryrefslogtreecommitdiffstats
path: root/lib/public/Share
diff options
context:
space:
mode:
authorRoeland Douma <rullzer@users.noreply.github.com>2016-04-12 09:46:25 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-12 09:46:25 +0200
commit495a964ca2e5384f6e6a97a4c9cab73a02928634 (patch)
tree6389fd51c66801b80cd58282b92dd261f0789078 /lib/public/Share
parent4ddf9f98f1189192acfeb5ba9046a4bc0b52dbe5 (diff)
downloadnextcloud-server-495a964ca2e5384f6e6a97a4c9cab73a02928634.tar.gz
nextcloud-server-495a964ca2e5384f6e6a97a4c9cab73a02928634.zip
Migrate post_groupDelete hook to share manager (#23841)
The hook now calls the share manager that will call the responsible shareProvider to do the proper cleanup. * Unit tests added Again nothing should change it is just to cleanup old code
Diffstat (limited to 'lib/public/Share')
-rw-r--r--lib/public/Share/IManager.php9
-rw-r--r--lib/public/Share/IShareProvider.php10
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php
index e3780ac070c..c43011d3177 100644
--- a/lib/public/Share/IManager.php
+++ b/lib/public/Share/IManager.php
@@ -161,6 +161,15 @@ interface IManager {
public function userDeleted($uid);
/**
+ * The group with $gid is deleted
+ * We need to clear up all shares to this group
+ *
+ * @param $gid
+ * @since 9.1.0
+ */
+ public function groupDeleted($gid);
+
+ /**
* Instantiates a new share object. This is to be passed to
* createShare.
*
diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php
index e201ba81ebc..24af36e0757 100644
--- a/lib/public/Share/IShareProvider.php
+++ b/lib/public/Share/IShareProvider.php
@@ -156,4 +156,14 @@ interface IShareProvider {
* @since 9.1.0
*/
public function userDeleted($uid, $shareType);
+
+ /**
+ * A group is deleted from the system.
+ * We have to clean up all shares to this group.
+ * Providers not handling group shares should just return
+ *
+ * @param string $gid
+ * @since 9.1.0
+ */
+ public function groupDeleted($gid);
}