summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-11-11 11:17:31 +0100
committerGitHub <noreply@github.com>2020-11-11 11:17:31 +0100
commit61496d3482bd4797c54a0655834916b1e0d667b1 (patch)
treee14262504a8c8e0ddf5af70c87d1a72adfa83a6d
parente39d657e24263c0eac8f1a995923305cd59cde7c (diff)
parente187c1d77887569f3113cb9191c303a53d8944b6 (diff)
downloadnextcloud-server-61496d3482bd4797c54a0655834916b1e0d667b1.tar.gz
nextcloud-server-61496d3482bd4797c54a0655834916b1e0d667b1.zip
Merge pull request #24041 from nextcloud/techdebt/noid/remove-oc_hooks-for-group-management
Remove old OC_Hook for OC_Group events
-rw-r--r--lib/private/Server.php14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 4ec90574740..1a2085fa0bc 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -433,45 +433,31 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) {
$groupManager = new \OC\Group\Manager($this->get(IUserManager::class), $c->get(SymfonyAdapter::class), $this->get(ILogger::class));
$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
- \OC_Hook::emit('OC_Group', 'pre_createGroup', ['run' => true, 'gid' => $gid]);
-
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid));
});
$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) {
- \OC_Hook::emit('OC_User', 'post_createGroup', ['gid' => $group->getGID()]);
-
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->dispatchTyped(new GroupCreatedEvent($group));
});
$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
- \OC_Hook::emit('OC_Group', 'pre_deleteGroup', ['run' => true, 'gid' => $group->getGID()]);
-
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group));
});
$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
- \OC_Hook::emit('OC_User', 'post_deleteGroup', ['gid' => $group->getGID()]);
-
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->dispatchTyped(new GroupDeletedEvent($group));
});
$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
- \OC_Hook::emit('OC_Group', 'pre_addToGroup', ['run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()]);
-
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user));
});
$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
- \OC_Hook::emit('OC_Group', 'post_addToGroup', ['uid' => $user->getUID(), 'gid' => $group->getGID()]);
- //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
- \OC_Hook::emit('OC_User', 'post_addToGroup', ['uid' => $user->getUID(), 'gid' => $group->getGID()]);
-
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->dispatchTyped(new UserAddedEvent($group, $user));