[dev] Permission check problems (always true)

Andre Pawlowski sqall at h4des.org
Thu Feb 26 18:40:47 UTC 2009


Well guys,

I'm stuck in a problem and need your help. I'm trying to use the Horde
permission system and I've read on the Horde website (
http://wiki.horde.org/Doc/Dev/PermsPackage ) and I was trying to
reverse engineer the code of Turba and other application and still
have no clue. Here is my problem:

I want to check if the user has for example "edit" permissions. So I
was using this code:

if($registry->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
...
}

but this is everytime true. I used echo to output the return of this
function and it's everytime 1.

$registry is the singleton object which is created in the
lib/base.php. The website told me to use this object for this
permission check. So what can I do to get the right permission? What
am I doing wrong?

Thanks in advance,

-- 

Andre Pawlowski

-------------------------------------------------------------------

Es ist nicht genug, zu wissen, man muss auch anwenden;
es ist nicht genug, zu wollen, man muss auch tun.
    -Johann Wolfgang von Goethe



More information about the dev mailing list