RE: checkRight function on the LiveUser object
"Jan Bolmeson" <[email protected]>
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
> > [Jan Bolmeson]
> > The following results and flags show that the user_right is correctly
> > collected from the database and assigned to $this->userRights in
> > Perm::Simple.php::readUserRights() Line 236. What happens with the
> > $this->userRights later?
>
> the naming may be slightly confusing but:
>
> - rights are the combined user and group rights the user has
> - userRights are only the rights directly assigned to the user
> - groupRights are only the rights the user has gained through (sub)group
> membership
[Jan Bolmeson]
Exactly.
>
> as a result rights is essentially the addition of the groupRights to the
> userRights where higher levels overwrite lower levels of you are using
> the complex container.
>
> checkRight() and checkRightLevel() only check the rights property
> obviously ..
[Jan Bolmeson]
But am I wrong in assuming that $LU->checkRight($rightID) should return
false/right_level and at the same disregard from if the right is assigned to
the user directly (user_right) or through group_membership (group_right)?
And even independently of above: I still don't seem to get
$LU->getProperty('userRights') return anything but an empty array even
though the flags show that the User's (with perm_id = 3) userrights are
correctly selected from the storage (DB). :(
//jan