Merge lp:~jcsackett/launchpad/filter-private-products-vocabulary into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2012-11-15 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16281 |
| Proposed branch: | lp:~jcsackett/launchpad/filter-private-products-vocabulary |
| Merge into: | lp:launchpad |
| Diff against target: |
90 lines (+38/-7) 2 files modified
lib/lp/registry/tests/test_productseries_vocabularies.py (+34/-4) lib/lp/registry/vocabularies.py (+4/-3) |
| To merge this branch: | bzr merge lp:~jcsackett/launchpad/filter-private-products-vocabulary |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Aaron Bentley (community) | 2012-11-15 | Approve on 2012-11-15 | |
|
Review via email:
|
|||
Commit Message
Updates ProductSeriesVo
Description of the Change
Summary
=======
Various parts of launchpad need to be updated to not show products that are of
a NONPUBLIC information type.
The ProductSeriesVo
the user that the user doesn't have rights to see.
Preimp
======
Rick Harding, Aaron Bentley (for information on the existing filtering
methods).
Implementation
==============
A pre-existing filtering method, `ProductSet`
used with the user (fetched from `ILaunchBag`) to get the necessar privacy
filter.
The filter is added to the queries used by the vocabulary search.
Tests for the case where there is no user as well as for a user who can't see
a product are added.
As a drive by, the empty TearDown method on the testcase has been removed, as
it is unneeded.
Tests
=====
bin/test -vvct test_search_
QA
==
Create a product with nonpublic info_type, and make a series for it. Search
for it in a product series picker--you should see it.
As an anonymous user, search. You should not see it.
With another account, search. You should not see it.
You may wish to repeat this with products that are PUBLIC. In all cases you
should see the series.
LoC
===
Part of Private Projects.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
