Merge ~ines-almeida/launchpad:prevent-bug-reporter-from-accessing-bug-in-disabled-product into launchpad:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 6ded68ea2ba83fd80d587dd8a95637efefbcef3d
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:prevent-bug-reporter-from-accessing-bug-in-disabled-product
Merge into: launchpad:master
Diff against target: 138 lines (+82/-3)
2 files modified
lib/lp/bugs/model/bugtasksearch.py (+27/-3)
lib/lp/registry/tests/test_private_team_visibility.py (+55/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+440317@code.staging.launchpad.net

Commit message

Exclude bugs from inactive product series in queries

Update query to exclude BugTasks from inactive product series from a user's reported bugs list

LP: #1321055

Description of the change

Update a query and introduced 2 unit tests that verify the change:
 - one that ensures the user can't see the bug they reported on an inactive product (which passed before and after the change)
 - one that ensures the user can't see the bug they reported on an inactive product *series* (which failed before the change)

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Needs Information
Revision history for this message
Ines Almeida (ines-almeida) wrote :

I believe there aren't any tests that particularly test bug visibility for a private bug that is not part of a product/productseries. I'll have a look at adding something to test that.

Regardless, I updated the query since the change makes sense

Revision history for this message
Ines Almeida (ines-almeida) wrote :

Added a unit test that indeed failed without the change mentioned by @cjwatson, and now passes

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: