diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-04 12:28:19 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-04 14:15:38 +0200 |
commit | e0cee43cf0a3899567f50a5fb03d867fc2f0327a (patch) | |
tree | 5f0d5503b3d971e0b813bc14fd7956cf114abbfe /lib/private/Share20/Manager.php | |
parent | f6cea3c9c436142110504ba76320d57ca7899b27 (diff) | |
download | nextcloud-server-e0cee43cf0a3899567f50a5fb03d867fc2f0327a.tar.gz nextcloud-server-e0cee43cf0a3899567f50a5fb03d867fc2f0327a.zip |
Migrate post_userDelete hook to share manager
This makes the post_userDelete hook call the sharemanager. This will
cleanup to and from this user.
* All shares owned by this user
* All shares with this user (user)
* All custom group shares
* All link share initiated by this user (to avoid invisible link shares)
Unit tests are added for the defaultshare provider as well as the
federated share provider
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r-- | lib/private/Share20/Manager.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 1c9d4d82277..6c665f7e133 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1019,6 +1019,18 @@ class Manager implements IManager { } /** + * @inheritdoc + */ + public function userDeleted($uid) { + $types = [\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK, \OCP\Share::SHARE_TYPE_REMOTE]; + + foreach ($types as $type) { + $provider = $this->factory->getProviderForType($type); + $provider->userDeleted($uid, $type); + } + } + + /** * Get access list to a path. This means * all the users and groups that can access a given path. * |