From 223ecab991980c4cea0ffbe63e02f63d6d490d6d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 13 May 2015 10:34:39 +0200 Subject: [PATCH] DbUserGroupBackend: Make it possible to handle memberships refs #8826 --- .../UserGroup/DbUserGroupBackend.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php index 8275421ff..3abe44348 100644 --- a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php +++ b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php @@ -22,6 +22,14 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa 'parent_name' => 'parent', 'created_at' => 'UNIX_TIMESTAMP(ctime)', 'last_modified' => 'UNIX_TIMESTAMP(mtime)' + ), + 'group_membership' => array( + 'group' => 'group_name COLLATE utf8_general_ci', + 'group_name', + 'user' => 'username COLLATE utf8_general_ci', + 'user_name' => 'username', + 'created_at' => 'UNIX_TIMESTAMP(ctime)', + 'last_modified' => 'UNIX_TIMESTAMP(mtime)' ) ); @@ -34,6 +42,10 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa 'group' => array( 'created_at' => 'ctime', 'last_modified' => 'mtime' + ), + 'group_membership' => array( + 'created_at' => 'ctime', + 'last_modified' => 'mtime' ) ); @@ -42,7 +54,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa * * @var array */ - protected $filterColumns = array('group', 'parent'); + protected $filterColumns = array('group', 'parent', 'user'); /** * The default sort rules to be applied on a query