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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!