[icinga-checkins] icinga.org: icingaweb2/master: DbUserGroupBackend: Group by group.id when joining group memberships

git at icinga.org git at icinga.org
Fri Nov 11 09:20:12 CET 2016


Module: icingaweb2
Branch: master
Commit: f7a8524dcecb69617d5ec7f56ce6608012c4531e
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=f7a8524dcecb69617d5ec7f56ce6608012c4531e

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Fri Nov 11 09:19:59 2016 +0100

DbUserGroupBackend: Group by group.id when joining group memberships

Prevents duplicate results in case a group has multiple members.

---

 library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php
index e30968f..a1911d9 100644
--- a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php
+++ b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php
@@ -254,7 +254,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
             $this->requireTable('group_membership'),
             'g.id = gm.group_id',
             array()
-        );
+        )->group('g.id');
     }
 
     /**



More information about the icinga-checkins mailing list