Assignees not able to change status of their blueprints

Bug #962071 reported by Laura Czajkowski
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Critical
Unassigned

Bug Description

I log in into launchpad with my launchpad id le-chi-thu. When visiting a blueprint assigned to me, I was not able to change the status field. Example of such BP is https://blueprints.launchpad.net/lava-test/+spec/linaro-validation-ste-kernel-testsuite

Changed in launchpad:
status: New → Triaged
importance: Undecided → High
Curtis Hovey (sinzui)
tags: added: specifications
Curtis Hovey (sinzui)
tags: added: regression
Revision history for this message
Curtis Hovey (sinzui) wrote :

The assignee and drafter can change the Definition Status and Implementation Status using the +status page. The two roles do have permission to change those fields over the API. The issue appears to relate to lazrjs.WidgetBase.can_write. The two fields have a mutator, and I can see that that WidgetBase looks for the mutator on __init__, and can_write checks that. Either the code is wrong, or specification's mutators are not registered correctly.

Changed in launchpad:
importance: High → Critical
tags: added: javascript
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is critical because the lazrjs widget removed the url to the +status page. The page is accessible to URL hackers only.

Revision history for this message
Curtis Hovey (sinzui) wrote :

This test demonstrates that the assignee has proper access, and that the widget renders the proper markup. I do not understand what other conditions are in play.

    def test_assignee_has_edit_rights(self):
        """Assignee of a blueprint can update the statuses."""
        assignee = self.factory.makePerson()
        specification = self.factory.makeSpecification(assignee=assignee)
        login_person(assignee)
        self.assertTrue(check_permission('launchpad.Edit', specification))
        from zope.security.checker import (
            canAccess,
            canWrite,
            )
        self.assertTrue(canWrite(specification, 'definition_status'))
        self.assertTrue(canAccess(specification, 'setDefinitionStatus'))
        from lp.app.browser.lazrjs import EnumChoiceWidget
        from lp.blueprints.interfaces.specification import ISpecification
        widget = EnumChoiceWidget(
            specification, ISpecification['definition_status'],
            header='Change definition status to', edit_view='+status',
            edit_title='Change definition status',
            css_class_prefix='specstatus')
        self.assertTrue(widget.can_write)
        markup = widget()
        self.assertIn('<a class="editicon sprite edit"', markup)
        self.assertIn('+status', markup)

Revision history for this message
Curtis Hovey (sinzui) wrote :

We just tested this on a new project created by Laura and as an assignee I could see the edit icons next to definition and implementation fields. I could change them in both firefox and chromium.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I think I sussed it. the bug is about the "Status:" field only. No one can edit "status" because it is a summary of "Direction", "Definition", and "Implementation". The assignee can change "Definition", and "Implementation" and Lp will update the overall "status".

Changed in launchpad:
status: Triaged → Incomplete
status: Incomplete → Invalid
Revision history for this message
Le Chi Thu (le-chi-thu) wrote :

Sorry for missunderstand how to use blueprint page and thank you for the support.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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