Merge lp:~rharding/launchpad/filter_more_products into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Richard Harding on 2012-11-20 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16295 |
| Proposed branch: | lp:~rharding/launchpad/filter_more_products |
| Merge into: | lp:launchpad |
| Diff against target: |
256 lines (+104/-19) 6 files modified
lib/lp/registry/model/product.py (+1/-1) lib/lp/translations/browser/translationgroup.py (+13/-0) lib/lp/translations/interfaces/translationgroup.py (+1/-1) lib/lp/translations/model/translationgroup.py (+21/-6) lib/lp/translations/templates/translationgroup-portlet-projects.pt (+7/-11) lib/lp/translations/tests/test_translationgroup.py (+61/-0) |
| To merge this branch: | bzr merge lp:~rharding/launchpad/filter_more_products |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Aaron Bentley (community) | 2012-11-20 | Approve on 2012-11-20 | |
|
Review via email:
|
|||
Commit Message
Update product filters to prevent leaking non-public products in the translationgroup code.
Description of the Change
= Summary =
A search for products brought up several places to look to make sure we filter
products so that non-public ones are not leaked.
== Pre Implementation ==
None, straight forward case of add filters.
== Implementation Notes ==
ITranslationGro
The query needed to be adjusted to allow for use of the
getproductPriva
ITranslationGro
This is actually querying for a list of ProjectGroups which do not have an
information type.
ProjectGro
For any returned project group you'd then have to query for the products
within it and those are all filtered appropriately.
ITranslationGro
This needed to be updated to add the extra filter. Tests added to verify it
filters correctly.
ITranslationGro
This again is querying for ProjectGroups which fall under the .projects case
above.
ITranslationGro
This uses self.products, self.projects to get data. Since they've been checked
and updated it's safe to use.
== Tests ==
lib/lp/
| Richard Harding (rharding) wrote : | # |

I've updated the one method that was changed to take a user argument and updated the template and view to provide the user so that it doesn't use the launchbag. However, changing the other ones, which are properties, will cascade into a larger change that I'd prefer was done as a second branch.