[whups] permissions

Todd Merritt tmerritt at email.arizona.edu
Wed May 25 10:34:30 PDT 2005


I think I didn't explain what I was looking for clearly.  In Perms.php,
it looks like the permissions that can be set are static:

    function getPermsArray()
    {
        return array(PERMS_SHOW => _("Show"),
                     PERMS_READ => _("Read"),
                     PERMS_EDIT => _("Edit"),
                     PERMS_DELETE => _("Delete"));
    }

Would it be acceptable to add somthing to the _<app>_perms function to
return a list of perms that are valid for this  object.  In the case of
whups, something like:

$perms['perms_avail']['whups:queues:' . $id] = array(
                               PERMS_ASSIGN => _("Assign"));

and have getPermsArray append anything returned by the app to the list ?

Todd

On Wed, 2005 05-25 at 18:24 +0200, Jan Schneider wrote:
> Zitat von Todd Merritt <tmerritt at email.arizona.edu>:
> 
> > I have something mostly working that extends the permissions class for
> > whups to allow per-queue restrictions on assigning and updating tickets.
> > My question is where setting of this option belongs.  Is there a way
> > that I can communicate these additional permissions back to the perms
> > class so that the standard permissions admin page can be used to set
> > them, or do I need to manipulate them manually from within whups ?  From
> > what I can see it is the latter, but I am hoping it's the former :)
> 
> _whups_perms() in whups/lib/api.php.
> 
> Jan.
> 
> -- 
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
> 
-- 



More information about the whups mailing list