[dev] subject should be accessing $perms from $conf[hooks][postauthenticate]

Jason Clifton jason at citydiesel.net
Wed Jun 27 19:40:53 UTC 2007


changed subject sorry

Quoting Jason Clifton <jason at citydiesel.net>:

> I am writing a postauthenticate hook to force certain users to be on
> the same subnet to be authenticated.
>
> I would like to use the horde permissions system for this but it
> doesn't behave the way I would expect. The permission has been created
> and can be accessed from horde.
>
> With the code below the permission doesnt seem to exist when executed
> inside the hook, however if executed from the horde framework (with
> php shell) it does exist.
>
> Is there a way to access this information within the postauthenticate hook?
>
>
> function _horde_hook_postauthenticate($userID, $credential, $realm){
> global $perms;
> if($perms->getPermissions('horde:local_only') == 1){
> //code here to validate subnet and return true or false
> }else{
> return true;
> }
> }
>
>
> Thanks for the help
> --
> Jason Clifton
> City Diesel
> www.citydiesel.net
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>



-- 
Jason Clifton
City Diesel
www.citydiesel.net


More information about the dev mailing list