[dev] App Status Modification
Chuck Hagenbuch
chuck at horde.org
Thu May 1 20:56:32 PDT 2003
Quoting Joe Wilson <joe.wilson at mindcandy.org>:
> So, now the point where I need guidance. I note that throughout the
> framework code, there are places in the code where comparisons are made
> to status directly ($registry->applications[$appname]['status']) and
> whether it is set to active or inactive (or header, etc.). The question I
> have is, what is the best way to proceed here?
The best way is most likely to replace all of those direct checks with a
$registry->appStatus($app) call.
> The most ambitious (and probably proper) way to address this is to modify
> Registry.php to process the "perm" value and return active or inactive
> depending on the users permissions (e.g.
> $registry->getParam('status',$appname)). This would, obviously, require
> changes to every app that uses this value as well as addition of a Perms
> objectto Registry.php.
Right. Those apps should probably be using an API to access that value,
though, anyway, so the change makes sense.
> Another approach is to simply modify all places where the comparisons are
> made and add code to handle the "perm" value appropriately.
Heck no. :)
> Thoughts? Comments? Any impact that I am not aware of due to my
> ignorance of the vast majority of the framework code?
We're going to need to optimize the permissions system soon. I've been
hacking very slowly at a way to do it, but am not really getting the time
to spend on that. Other contributions welcome.
-chuck
--
Charles Hagenbuch, <chuck at horde.org>
The alligators were there, too, in a bathtub inside the house.
More information about the dev
mailing list