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
=== modified file 'lib/canonical/launchpad/security.py'
--- lib/canonical/launchpad/security.py 2010-08-09 19:58:45 +0000
+++ lib/canonical/launchpad/security.py 2010-08-09 19:58:45 +0000
@@ -1171,12 +1171,12 @@
1171 usedfor = ICodeImportMachine1171 usedfor = ICodeImportMachine
11721172
11731173
1174class EditSourcePackageRecipeBuilds(AuthorizationBase):1174class AdminSourcePackageRecipeBuilds(AuthorizationBase):
1175 """Control who can edit SourcePackageRecipeBuilds.1175 """Control who can edit SourcePackageRecipeBuilds.
11761176
1177 Access is restricted to members of ~bazaar-experts and Buildd Admins.1177 Access is restricted to members of ~bazaar-experts and Buildd Admins.
1178 """1178 """
1179 permission = 'launchpad.Edit'1179 permission = 'launchpad.Admin'
1180 usedfor = ISourcePackageRecipeBuild1180 usedfor = ISourcePackageRecipeBuild
11811181
1182 def checkAuthenticated(self, user):1182 def checkAuthenticated(self, user):
11831183
=== modified file 'lib/lp/code/browser/configure.zcml'
--- lib/lp/code/browser/configure.zcml 2010-08-09 19:58:45 +0000
+++ lib/lp/code/browser/configure.zcml 2010-08-09 19:58:45 +0000
@@ -1129,13 +1129,13 @@
1129 class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildCancelView"1129 class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildCancelView"
1130 name="+cancel"1130 name="+cancel"
1131 template="../../app/templates/generic-edit.pt"1131 template="../../app/templates/generic-edit.pt"
1132 permission="launchpad.Edit"/>1132 permission="launchpad.Admin"/>
1133 <browser:page1133 <browser:page
1134 for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"1134 for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"
1135 class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView"1135 class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView"
1136 name="+rescore"1136 name="+rescore"
1137 template="../../app/templates/generic-edit.pt"1137 template="../../app/templates/generic-edit.pt"
1138 permission="launchpad.Edit"/>1138 permission="launchpad.Admin"/>
1139 <browser:menus1139 <browser:menus
1140 classes="1140 classes="
1141 SourcePackageRecipeNavigationMenu1141 SourcePackageRecipeNavigationMenu
11421142
=== modified file 'lib/lp/code/browser/sourcepackagerecipebuild.py'
--- lib/lp/code/browser/sourcepackagerecipebuild.py 2010-07-28 14:36:32 +0000
+++ lib/lp/code/browser/sourcepackagerecipebuild.py 2010-08-09 19:58:45 +0000
@@ -47,7 +47,7 @@
4747
48 links = ('cancel', 'rescore')48 links = ('cancel', 'rescore')
4949
50 @enabled_with_permission('launchpad.Edit')50 @enabled_with_permission('launchpad.Admin')
51 def cancel(self):51 def cancel(self):
52 if self.context.status in UNEDITABLE_BUILD_STATES:52 if self.context.status in UNEDITABLE_BUILD_STATES:
53 enabled = False53 enabled = False
@@ -55,7 +55,7 @@
55 enabled = True55 enabled = True
56 return Link('+cancel', 'Cancel build', icon='remove', enabled=enabled)56 return Link('+cancel', 'Cancel build', icon='remove', enabled=enabled)
5757
58 @enabled_with_permission('launchpad.Edit')58 @enabled_with_permission('launchpad.Admin')
59 def rescore(self):59 def rescore(self):
60 if self.context.status in UNEDITABLE_BUILD_STATES:60 if self.context.status in UNEDITABLE_BUILD_STATES:
61 enabled = False61 enabled = False

Subscribers

People subscribed via source and target branches

to status/vote changes: