[dev] Re: [cvs] commit: midas campaigns.php clients.php midas/docs summary.php midas/templates/menu menu.inc

Chuck Hagenbuch chuck at horde.org
Sat Feb 22 11:28:00 PST 2003


Quoting Marko Djukic <marko at oblo.com>:

> true, never got round to finishing it... how does it differ from
> Whups::permissionsFilter? (where i lifted the code from...) similarly i'd
> want to pass it an array of campaigns, and have it return only the campaigns
> that the "account manager" is authorised to go into.

That would be a filter. The function in Midas was always being passed
array('admin').

Whups::permissionsFilter() takes an array of comments or modules and removes
all those that the current user doesn't have permission to see. That's why
it's a filter - you still get an array back. Midas::permissionsFilter() was
returning an array, but it didn't *need* to be an array, and the way the
code was written was really innefficient (and hard to follow) for what it
was actually doing.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
must ... find ... acorns ... *thud*


More information about the dev mailing list