From 9fdaa1e38014b80609af2fbddb737d6c8e6734d1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 13 Jun 2013 10:46:49 +0200 Subject: [PATCH] =?utf8?q?Bei=20Clientanmeldung=20Zuweisung=20Gruppen<->Ma?= =?utf8?q?ndanten=20ber=C3=BCcksichtigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Auth.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/Auth.pm b/SL/Auth.pm index 6a69604b6..184468e56 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -1360,9 +1360,13 @@ sub load_rights_for_user { (SELECT ug.group_id FROM auth.user_group ug LEFT JOIN auth."user" u ON (ug.user_id = u.id) - WHERE u.login = ?)|; + WHERE u.login = ?) + AND group_id IN + (SELECT cg.group_id + FROM auth.clients_groups cg + WHERE cg.client_id = ?)|; - $sth = prepare_execute_query($::form, $dbh, $query, $login); + $sth = prepare_execute_query($::form, $dbh, $query, $login, $self->client->{id}); while ($row = $sth->fetchrow_hashref()) { $rights->{$row->{right}} |= $row->{granted}; -- 2.20.1