Home » Authentication » LiveUser » Bug #6374
No rights for a user if the user only has inherited rights
Details
| Submitted | 2005-12-30 13:12 UTC |
|---|---|
| From | michiel at dinnersite dot nl |
| Assigned | lsmith |
| Status | Closed |
| Package | LiveUser |
| PHP Version | 4.4.1 |
| OS | Linux mandrake 9.0 |
| Roadmaps | (Not assigned) |
Comments
[2005-12-30 13:12 UTC] michiel at dinnersite dot nl
Description:
------------
LiveUser_Admin 0.3.6, LiveUser 0.16.8
When you add a user to a group, assign some rights to this group (adding no rights to the user) and then retrieve the rights for this user LUA returns an empty array.
It ofcourse should return an Array containing all the rights that this user inherited form the group.
When I added a user right for this user ALL the proper rights show up and everything seems to work just fine.
I think I tracked down the bug, it's on line 849 in file LiveUser/Admin/Perm/Complex.php
Lines of code:
if (empty($rights) || (!$params['inherited'] && !$params['implied'])) {
return $rights;
}
When I change || to && everything works fine.
Test script:
---------------
$params = Array('filters' =>
Array(
'perm_user_id' => $LU->getProperty('perm_user_id')
),
'inherited' => true,
'implied' => true,
'rekey' => true
);
$rights = $LUA->perm->getRights($params);
vardump($rights);
Expected result:
----------------
An array with the user rights
Actual result:
--------------
An empty array