[dev] App Status Modification

Joe Wilson joe.wilson at mindcandy.org
Tue Apr 29 23:03:41 PDT 2003


Greetings,

I have been working with the dev build and have made a modification that, once
finished, I will submit back to the group for inclusion if you want it. 
However, I have reached the point where I would like some guidance as to how to
proceed.

The basic functionality is to tie the permissions system to the main Horde menu.
 You can now set $app[$appname]['status']='perm'.  When menu.php goes to render
the menu and encounters an app where status='perm', it checks to see whether
the user has "menu:appname" PERM_READ permissions.

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 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.

Another approach is to simply modify all places where the comparisons are made
and add code to handle the "perm" value appropriately.

Thoughts?  Comments?  Any impact that I am not aware of due to my ignorance of
the vast majority of the framework code?

Regards,

Joe

P.S. Since I do not have the ability to update the CVS repository directly, what
is the preferred mechanism for submitting diffs?  Posting to this list?


More information about the dev mailing list