Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.16.14

Bug #6374 No rights for a user if the user only has inherited rights
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)    
Subscription  


 [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

Comments

 [2005-12-31 13:03 UTC] lsmith
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.