launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00498
[Merge] lp:~rockstar/launchpad/fix-spr-builds-perms into lp:launchpad
Paul Hummer has proposed merging lp:~rockstar/launchpad/fix-spr-builds-perms into lp:launchpad with lp:~rockstar/launchpad/fix-cancel-rescore-permissions as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#615513 Recipe operations that are admin only should be launchpad.Admin
https://bugs.launchpad.net/bugs/615513
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.
--
https://code.launchpad.net/~rockstar/launchpad/fix-spr-builds-perms/+merge/32139
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rockstar/launchpad/fix-spr-builds-perms into lp:launchpad.
=== 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 @@
usedfor = ICodeImportMachine
-class EditSourcePackageRecipeBuilds(AuthorizationBase):
+class AdminSourcePackageRecipeBuilds(AuthorizationBase):
"""Control who can edit SourcePackageRecipeBuilds.
Access is restricted to members of ~bazaar-experts and Buildd Admins.
"""
- permission = 'launchpad.Edit'
+ permission = 'launchpad.Admin'
usedfor = ISourcePackageRecipeBuild
def checkAuthenticated(self, user):
=== 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 @@
class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildCancelView"
name="+cancel"
template="../../app/templates/generic-edit.pt"
- permission="launchpad.Edit"/>
+ permission="launchpad.Admin"/>
<browser:page
for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"
class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView"
name="+rescore"
template="../../app/templates/generic-edit.pt"
- permission="launchpad.Edit"/>
+ permission="launchpad.Admin"/>
<browser:menus
classes="
SourcePackageRecipeNavigationMenu
=== 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 @@
links = ('cancel', 'rescore')
- @enabled_with_permission('launchpad.Edit')
+ @enabled_with_permission('launchpad.Admin')
def cancel(self):
if self.context.status in UNEDITABLE_BUILD_STATES:
enabled = False
@@ -55,7 +55,7 @@
enabled = True
return Link('+cancel', 'Cancel build', icon='remove', enabled=enabled)
- @enabled_with_permission('launchpad.Edit')
+ @enabled_with_permission('launchpad.Admin')
def rescore(self):
if self.context.status in UNEDITABLE_BUILD_STATES:
enabled = False