diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-13 15:00:12 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-13 15:00:12 +0200 |
commit | 6144ced7a09356a0aaa70cdc359613d3abf8d28e (patch) | |
tree | 53f4a3586cae4d4320141e71677e2b3dfc435052 /lib/public | |
parent | 15397a9c910925ac368001545ab96509a12cb0ad (diff) | |
download | nextcloud-server-6144ced7a09356a0aaa70cdc359613d3abf8d28e.tar.gz nextcloud-server-6144ced7a09356a0aaa70cdc359613d3abf8d28e.zip |
Move post_removeFromGroup to shareManager
The last sharing hook to be moved over.
* Added unit tests
* Removed old tests that relied on old behaviour
* Removed old hooks.php
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Share/IManager.php | 12 | ||||
-rw-r--r-- | lib/public/Share/IShareProvider.php | 11 |
2 files changed, 22 insertions, 1 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index c43011d3177..392c0471768 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -164,12 +164,22 @@ interface IManager { * The group with $gid is deleted * We need to clear up all shares to this group * - * @param $gid + * @param string $gid * @since 9.1.0 */ public function groupDeleted($gid); /** + * The user $uid is deleted from the group $gid + * All user specific group shares have to be removed + * + * @param string $uid + * @param string $gid + * @since 9.1.0 + */ + public function userDeletedFromGroup($uid, $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 24af36e0757..ac75a6f20b0 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -166,4 +166,15 @@ interface IShareProvider { * @since 9.1.0 */ public function groupDeleted($gid); + + /** + * A user is deleted from a group + * We have to clean up all the related user specific group shares + * Providers not handling group shares should just return + * + * @param string $uid + * @param string $gid + * @since 9.1.0 + */ + public function userDeletedFromGroup($uid, $gid); } |