Merge lp:~adeuring/launchpad/bug-1079116 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | j.c.sackett on 2012-11-29 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16325 |
| Proposed branch: | lp:~adeuring/launchpad/bug-1079116 |
| Merge into: | lp:launchpad |
| Diff against target: |
106 lines (+63/-2) 2 files modified
lib/lp/code/browser/branchlisting.py (+5/-1) lib/lp/code/browser/tests/test_branchlisting.py (+58/-1) |
| To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-1079116 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-11-29 | Approve on 2012-11-29 | |
|
Review via email:
|
|||
Commit Message
If a branch is the series branch of a proprietary product, do not try to display data about the series in branch listings if users have access to the branch but not to the product.
Description of the Change
This branch fixes bug 1079116: https:/
The cause of the error: A user may have an artfiact grant for a proprietary branch that is the official branch of a series of a proprieatry product. If the user does not have a policy grant for the product, accessing the series object in lp.code.
product_series_map builds a dictionary branch_id -> [product_series, ...]; I simply added a filter so that only series instances are added which the user can view. The method series.
test:
./bin/test code -vvt test_proprietar
no lint

I had a concern about the userCanView calls, but I think your logic about check_permission is correct, so this looks good. Thanks for adding that note in the proposal.