PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #6500

Incorrect getRight result

Details

Submitted2006-01-16 10:25 UTC
Frommichiel at dinnersite dot nl
Assignedlsmith
StatusClosed
PackageLiveUser
PHP Version4.4.0
OSLinux Mandrake 9.0
Roadmaps(Not assigned)

Comments

[2006-01-16 10:25 UTC] michiel at dinnersite dot nl

Description:
------------
The case:

I want to retrieve some rights with a certain filter. I'm working with groups and therefore have some inherited rights.

The following params are supplied to the getRights:
Array
(
[filters] => Array
(
[right_id] => 12
[perm_user_id] => 8
)

[inherited] => 1
[implied] => 1
[rekey] => 1
[fields] => Array
(
[0] => right_id
[1] => right_level
[2] => area_id
[3] => right_define_name
[4] => has_implied
)

[select] => all
)

What I expect is a resultset with only the right_id 12. It however returns an array containing all the rights assigned to this user. In other words: the filter right_id is lost. After checking the code I found out it dumps all filter settings and replaces them with group_id -> $groups (line 1001 in Admin/Perm/Complex.php).

When i change the line to:
$params['filters'] = array_merge($params['filters'], array('group_id' => $result));

It now retains the filters settings.

[2006-01-16 13:30 UTC] michiel at dinnersite dot nl

Works like a charm :)

[2006-01-16 13:34 UTC] michiel at dinnersite dot nl

Works like a charm :)