← Back to team overview

launchpad-dev team mailing list archive

Re: Fun fact of the day: Launchpad permissions

 

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). Including them changes
the figures but doesn't much change the distribution:

     19  launchpad.Admin
      4  launchpad.Append
      4  launchpad.BugSupervisor
      1  launchpad.Commercial
      5  launchpad.Driver
     65  launchpad.Edit
      1  launchpad.ExpensiveRequest
      2  launchpad.LanguagePacksAdmin
      6  launchpad.Moderate
      2  launchpad.Owner
      2  launchpad.Special
      7  launchpad.TranslationsAdmin
     38  launchpad.View
      1  zope.app.apidoc.UseAPIDoc
      1  zope.ManageApplication
      1  zope.View

Sorted by count:

     65  launchpad.Edit
     38  launchpad.View
     19  launchpad.Admin
      7  launchpad.TranslationsAdmin
      6  launchpad.Moderate
      5  launchpad.Driver
      4  launchpad.BugSupervisor
      4  launchpad.Append
      2  launchpad.Special
      2  launchpad.Owner
      2  launchpad.LanguagePacksAdmin
      1  zope.View
      1  zope.ManageApplication
      1  zope.app.apidoc.UseAPIDoc
      1  launchpad.ExpensiveRequest
      1  launchpad.Commercial

Fwiw, here's the command I used:

    find lib/lp lib/canonical -name security.py -print0 |
        xargs -r0 grep -h 'permission =' |
        sed -e "s/^ *permission =//;s/[\"']//g;/[()]/d;/None/d" |
        sort | uniq -c | sort -rg



Follow ups

References