← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wallyworld/launchpad/remove-answer-contact-827051 into lp:launchpad

 

The proposal to merge lp:~wallyworld/launchpad/remove-answer-contact-827051 into lp:launchpad has been updated.

Description changed to:

The canUserAlterAnswerContact method is used to determine whether a logged in user can remove an answer contact from the answer contacts portlet. It is required that question target (eg project) owners be able to remove answer contacts. However, DistributionSourcePackage (which is a question target) has no owner attribute.

== Implementation ==

Add an owner property to SourcePackageQuestionTargetMixin. DistributionSourcePackage extends this class. The owner property returns distribution.owner
Now canUserAlterAnswerContact() use "self.owner" in its code.

== QA ==

Goto https://answers.qastaging.launchpad.net/ubuntu/+source/firefox
Ensure both answer contacts portals load correctly and that if the logged in user is the owner of firefox dsp, they can remove answer contacts.

== Tests ==

Add a new test to lib/lp/answers/tests/test_questiontarget.py
  test_canUserAlterAnswerContact_DistributionSourcePackage_owner
This fills a gap in the test coverage because no tests called canUserAlterAnswerContact() for a dsp.
Also augmented existing tests:
  test_canUserAlterAnswerContact_owner

Also added new test to lib/lp/answers/browser/tests/test_questiontarget.py
  test_data_target_owner_answercontact_looks

== Lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/answers/interfaces/questiontarget.py
  lib/lp/answers/model/question.py
  lib/lp/answers/tests/test_questiontarget.py
  lib/lp/registry/model/sourcepackage.py

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/remove-answer-contact-827051/+merge/71632
-- 
https://code.launchpad.net/~wallyworld/launchpad/remove-answer-contact-827051/+merge/71632
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/remove-answer-contact-827051 into lp:launchpad.


References