Merge lp:~brian-murray/launchpad/modify-official-bug-tags-permissions into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brian Murray | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11701 | ||||
Proposed branch: | lp:~brian-murray/launchpad/modify-official-bug-tags-permissions | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
354 lines (+163/-65) 7 files modified
lib/canonical/launchpad/permissions.zcml (+5/-0) lib/canonical/launchpad/security.py (+19/-4) lib/lp/bugs/browser/bugtarget.py (+1/-1) lib/lp/bugs/browser/configure.zcml (+1/-1) lib/lp/bugs/stories/bug-tags/xx-official-bug-tags.txt (+18/-1) lib/lp/bugs/stories/webservice/xx-bug-target.txt (+23/-0) lib/lp/registry/configure.zcml (+96/-58) |
||||
To merge this branch: | bzr merge lp:~brian-murray/launchpad/modify-official-bug-tags-permissions | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Edwin Grubbs (community) | code | Approve | |
Review via email: mp+37758@code.launchpad.net |
Commit message
Allow a project's or distribution's bug supervisor to set the official bug tags for it.
Description of the change
This branch creates a new permission launchpad.
The launchpad.
I've added a test to xx-official-
bin/test -cvvt xx-official-
Hi Brian,
This branch looks good. I have a few comments below for changes I would like.
-Edwin
>=== modified file 'lib/canonical/ launchpad/ security. py' launchpad/ security. py 2010-09-14 18:28:53 +0000 launchpad/ security. py 2010-10-06 17:27:19 +0000 interfaces. packagebuild import IPackageBuild interfaces. bugtarget import IOfficialBugTag TargetRestricte d interfaces. branch import ( special_ branch_ access, ted(self, user):
>--- lib/canonical/
>+++ lib/canonical/
>@@ -61,6 +61,7 @@
> IBuildFarmJobOld,
> )
> from lp.buildmaster.
>+from lp.bugs.
> from lp.code.
> IBranch,
> user_has_
>@@ -656,7 +657,7 @@
>
> def checkAuthentica
> """Only the Launchpad admins need this, we are only going to use it
>- for connecting up series and distroseriess where we did not have
>+ for connecting up series and distroseries where we did not have
> them."""
According to PEP8, if the docstring is more than one line, the
ending triple-quotes should appear on a line by itself.
> return user.in_admin cialBugTagsByOw nerBugSuperviso rOrAdmins( AuthorizationBa se):
>
>@@ -897,6 +898,18 @@
> user.in_admin)
>
>
>+class EditProductOffi
This line is too long. It can be wrapped like esLanguagePacks .
AdminDistroSeri
>+ """The owner of a product and its bug supervisor should be able to
>+ edit its official bug tags."""
The first sentence of the docstring should fit on a single line, and
there should be a blank line separating it from any additional text.
>+ permission = 'launchpad. BugSupervisor' TargetRestricte d ted(self, user): self.obj. bug_supervisor) or self.obj. owner) or es(AdminByAdmin sTeam): bugs/stories/ bug-tags/ xx-official- bug-tags. txt' bugs/stories/ bug-tags/ xx-official- bug-tags. txt 2010-10-03 15:30:06 +0000 bugs/stories/ bug-tags/ xx-official- bug-tags. txt 2010-10-06 17:27:19 +0000 sampledata import ADMIN_EMAIL launchpad. ftests import login, logout makePerson( ) d_owner) makeDistributio n(name= 'youbuntu' , owner=d_owner) makeTeam( owner=d_ owner) makePerson( password= 'g00dpassword' ) team.addMember( supervisor_ member, d_owner) setBugSuperviso r(supervisor_ team, d_owner) member. preferredemail. email) browser. open( bugs.launchpad. dev/youbuntu/ +...
>+ usedfor = IOfficialBugTag
>+
>+ def checkAuthentica
>+ return (user.inTeam(
>+ user.inTeam(
>+ user.in_admin)
>+
>+
> class AdminDistroSeri
> """Soyuz involves huge chunks of data in the archive and librarian,
> so for the moment we are locking down admin and edit on distributions
>=== modified file 'lib/lp/
>--- lib/lp/
>+++ lib/lp/
>@@ -52,13 +52,32 @@
> ...
> Unauthorized...
>
>+The link is also available for the bug supervisor.
>+
>+ >>> from lp.testing.
>+ >>> from canonical.
>+ >>> login(ADMIN_EMAIL)
>+ >>> d_owner = factory.
>+ >>> logout()
>+ >>> login_person(
>+ >>> distro = factory.
>+ >>> supervisor_team = factory.
>+ >>> supervisor_member = factory.
>+ >>> added = supervisor_
>+ >>> distro.
>+ >>> bug_super_browser = setupBrowser(
>+ ... auth='Basic %s:g00dpassword' %
>+ ... supervisor_
>+ >>> logout()
>+ >>> bug_super_
>+ ... 'http://