Re: permissions

Todd Merritt <[email protected]> Wed, 25 May 2005 11:42:31 -0700
Newsgroups gmane.comp.horde.whups
Message-ID <[email protected]>
On Wed, 2005-05-25 at 20:27 +0200, Jan Schneider wrote:
> Zitat von Todd Merritt <[email protected]>:
> 
> > 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 ?
> 
> You can create any custom permission types. They only need a matching 
> form field type. See other api.php's for examples.
> 
I've created the custom permissions, using giapeto as a model.  Giapeto
for example adds PERMS_CREATE and PERMS_MOVE, but those do not show up
as options in the permissions administration menu, which is what I'm
trying to do.  All the other api.phps simply add permission names, not
possible values.

Todd


-- 
Whups mailing list - Join the hunt: http://horde.org/bounties/#whups
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]