From: Moritz Bunkus Date: Thu, 13 Jun 2013 08:46:49 +0000 (+0200) Subject: Bei Clientanmeldung Zuweisung Gruppen<->Mandanten berücksichtigen X-Git-Tag: release-3.1.0beta1~331^2~25 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9fdaa1e38014b80609af2fbddb737d6c8e6734d1;p=kivitendo-erp.git Bei Clientanmeldung Zuweisung Gruppen<->Mandanten berücksichtigen --- 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};