← Back to team overview

launchpad-dev team mailing list archive

Re: Fun fact of the day: Launchpad permissions

 

On Thu, 2011-03-31 at 09:28 +0100, Jonathan Lange wrote:
> On Wed, Mar 30, 2011 at 8:09 PM, Guilherme Salgado
> <salgado@xxxxxxxxxxxxx> wrote:
> > On Wed, 2011-03-30 at 10:12 +0100, Gavin Panella wrote:
> >> On 29 March 2011 17:52, Jonathan Lange <jml@xxxxxxxxxxxxx> wrote:
> >> [...]
> >> > ("grep 'permission =' lib/canonical/launchpad/security.py | sed -e
> >> > 's/^ *permission =//' | sort | uniq -c", plus some manual cleanup)
> >>
> >> Some of the security stuff has moved out of c.l.security (specifically
> >> code and bugs have their own security modules).
> >
> > That'd be one of the reasons to use the apidoc, which shows them all in
> > a single page:  http://bit.ly/fCIFvT  (or http://bit.ly/dGF30M which has
> > the security adapters that use them)
> >
> 
> The two links are the same, and neither of them lists the different
> kinds of permissions.

They're not the same; I just followed them here and they took me to
different pages.

Maybe I should've been clearer... on the first one you can see the
different permissions down at the bottom -- they're registered as
IPermission utilities.  And the second one is for IAuthorization, so you
can see all the adapters that provide that interface -- those are our
security adapters.

> 
> > I think the apidoc[1] is the best tool we have for this sort of thing as
> > it leverages our zope component declarations to show a lot of
> > information about our interfaces/adapters/utilities.
> >
> > [1] https://devpad.canonical.com/~gary
> 
> I don't know. I really want to like it, but for some reason it's very
> hard to. I guess it's partly that we're only running it statically and
> it relies on AJAX goodness to be at its level best. Perhaps also
> because it says it's Zope API documentation, and I don't really want
> to read Zope API documentation. I'm never sure what I would go to that
> page to learn about, unlike a traditional API documentation
> (e.g.<http://people.canonical.com/~mwh/canonicalapi/>).

What I find the most useful thing about it is the interfaces browser,
which allows you to see all the classes/adapters/utilities that provide
that interface, the views registered for it and a bunch of other stuff.

Granted, the "bunch of other stuff" part may be too long and not very
useful, but once you know what you should find there you can look for
the specific bits you're interested in.

-- 
Guilherme Salgado <https://launchpad.net/~salgado>

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References