[dev] Re: Q regarding horde and permissions

Chuck Hagenbuch chuck at horde.org
Thu Oct 7 21:37:36 PDT 2004


Quoting Jan Schneider <jan at horde.org>:

>> I know of no way to translate a permissions string into a URL, the
>> closest thing is $registry->link() or $registry->linkByPackage(), but
>> those take a hash of parameters to make a link, not an object string or
>> perm string.  I talked with Chuck, and the idea was to extend the show()
>> APIs to handle the object path type string.  He'll have to give you an
>> idea of how he wanted to do that.
>
> Yeah, that sounds like a good idea. Though I would create a separate API
> method, say "link" or "get", as a counterpart of the browse API method. So,
> we have the browse method returning all available objects and a link method
> returning a link based on the IDs returned by browser. Your method that
> requests the word list or an indexable full text also uses these IDs as
> references.

What I want to avoid is having multiple apis for figuring out urls of 
items. The
great thing about the way Registry::link() works now is that it 
essentially uses
named parameters, by requiring the $params var to be an associative array. No
reason we couldn't take advantage of this same thing in turning show() into a
Registry::call() method instead. That way every time show was invoked it would
know what it was getting, so it could easily adapt to being passed a path, a
task_id/tasklist_id, or a UID.

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams


More information about the dev mailing list