Drivers cannot add new series in IDerivativeDistributions

Bug #752613 reported by Julian Edwards
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Julian Edwards

Bug Description

The permissions are mistakenly set to launchpad.Append and they should be launchpad.Moderate.

Curtis proposes this patch:
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2011-03-31 12:53:27 +0000
+++ lib/lp/registry/browser/configure.zcml 2011-04-06 14:22:33 +0000
@@ -1964,7 +1964,7 @@
         for="lp.registry.interfaces.distribution.IDerivativeDistribution"
         class="lp.registry.browser.distroseries.DistroSeriesAddView"
         facet="overview"
- permission="launchpad.Append"
+ permission="launchpad.Moderate"
         template="../../app/templates/generic-edit.pt">
     </browser:page>
     <browser:page

=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2011-03-30 21:38:03 +0000
+++ lib/lp/registry/browser/distribution.py 2011-04-06 14:21:36 +0000
@@ -465,7 +465,7 @@

     usedfor = IDerivativeDistribution

- @enabled_with_permission('launchpad.Append')
+ @enabled_with_permission('launchpad.Moderate')
     def addseries(self):
         text = 'Add series'
         return Link('+addseries', text, icon='add')

=== modified file 'lib/lp/registry/browser/tests/distroseries-views.txt'
--- lib/lp/registry/browser/tests/distroseries-views.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/browser/tests/distroseries-views.txt 2011-04-06 14:20:21 +0000
@@ -264,7 +264,7 @@

     >>> login_person(yo_driver)
     >>> view = create_view(youbuntu, name='+addseries')
- >>> check_permission('launchpad.Driver', view)
+ >>> check_permission('launchpad.Moderate', view)
     True

     >>> yo_form = dict(form)

Related branches

Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Julian Edwards (julian-edwards)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.04
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.