Merge lp:~rockstar/launchpad/fix-spr-builds-perms into lp:launchpad/db-devel

Proposed by Paul Hummer
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: 9667
Proposed branch: lp:~rockstar/launchpad/fix-spr-builds-perms
Merge into: lp:launchpad/db-devel
Prerequisite: lp:~rockstar/launchpad/fix-cancel-rescore-permissions
Diff against target: 60 lines (+6/-6)
3 files modified
lib/canonical/launchpad/security.py (+2/-2)
lib/lp/code/browser/configure.zcml (+2/-2)
lib/lp/code/browser/sourcepackagerecipebuild.py (+2/-2)
To merge this branch: bzr merge lp:~rockstar/launchpad/fix-spr-builds-perms
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+32139@code.launchpad.net

Description of the change

This branch fixes the issue Aaron brought up in my last review, and fixes bug #615513. It just swaps launchpad.Edit permissions for launchpad.Admin permissions.

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/security.py'
2--- lib/canonical/launchpad/security.py 2010-08-09 19:58:45 +0000
3+++ lib/canonical/launchpad/security.py 2010-08-09 19:58:45 +0000
4@@ -1171,12 +1171,12 @@
5 usedfor = ICodeImportMachine
6
7
8-class EditSourcePackageRecipeBuilds(AuthorizationBase):
9+class AdminSourcePackageRecipeBuilds(AuthorizationBase):
10 """Control who can edit SourcePackageRecipeBuilds.
11
12 Access is restricted to members of ~bazaar-experts and Buildd Admins.
13 """
14- permission = 'launchpad.Edit'
15+ permission = 'launchpad.Admin'
16 usedfor = ISourcePackageRecipeBuild
17
18 def checkAuthenticated(self, user):
19
20=== modified file 'lib/lp/code/browser/configure.zcml'
21--- lib/lp/code/browser/configure.zcml 2010-08-09 19:58:45 +0000
22+++ lib/lp/code/browser/configure.zcml 2010-08-09 19:58:45 +0000
23@@ -1129,13 +1129,13 @@
24 class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildCancelView"
25 name="+cancel"
26 template="../../app/templates/generic-edit.pt"
27- permission="launchpad.Edit"/>
28+ permission="launchpad.Admin"/>
29 <browser:page
30 for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"
31 class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView"
32 name="+rescore"
33 template="../../app/templates/generic-edit.pt"
34- permission="launchpad.Edit"/>
35+ permission="launchpad.Admin"/>
36 <browser:menus
37 classes="
38 SourcePackageRecipeNavigationMenu
39
40=== modified file 'lib/lp/code/browser/sourcepackagerecipebuild.py'
41--- lib/lp/code/browser/sourcepackagerecipebuild.py 2010-07-28 14:36:32 +0000
42+++ lib/lp/code/browser/sourcepackagerecipebuild.py 2010-08-09 19:58:45 +0000
43@@ -47,7 +47,7 @@
44
45 links = ('cancel', 'rescore')
46
47- @enabled_with_permission('launchpad.Edit')
48+ @enabled_with_permission('launchpad.Admin')
49 def cancel(self):
50 if self.context.status in UNEDITABLE_BUILD_STATES:
51 enabled = False
52@@ -55,7 +55,7 @@
53 enabled = True
54 return Link('+cancel', 'Cancel build', icon='remove', enabled=enabled)
55
56- @enabled_with_permission('launchpad.Edit')
57+ @enabled_with_permission('launchpad.Admin')
58 def rescore(self):
59 if self.context.status in UNEDITABLE_BUILD_STATES:
60 enabled = False

Subscribers

People subscribed via source and target branches

to status/vote changes: