Merge lp:~rharding/launchpad/nonpublic_1052659 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2012-11-29 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16328 |
| Proposed branch: | lp:~rharding/launchpad/nonpublic_1052659 |
| Merge into: | lp:launchpad |
| Diff against target: |
406 lines (+235/-86) 2 files modified
lib/lp/blueprints/model/specification.py (+25/-85) lib/lp/blueprints/tests/test_specification.py (+210/-1) |
| To merge this branch: | bzr merge lp:~rharding/launchpad/nonpublic_1052659 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Aaron Bentley (community) | 2012-11-27 | Approve on 2012-11-29 | |
|
Review via email:
|
|||
Commit Message
Make SpecificationSe
Description of the Change
= Summary =
The code was changed to only pull public specifications. In order to change
the method to be privacy aware it needed to be storm-ified and in the end much
of the query building tools already existed to do that.
== Pre Implementation ==
A little bit of chat with Aaron getting a sanity check on the storm-ification.
== Implementation Notes ==
Since the original method wasn't well tested, I copied over the product specification tests on Aaron's suggestion. The tests required some love and tweaking in order to work with a SpecificationSet vs a single Product, but I added them to trunk first with the only failing tests being those around non-public specifications. Then moved the tests over to this branch of work and they all passes first try.
Updated the specifications method to work via a constructed storm query adding
in the privacy tables and clauses via the existing visible_
method.
Then used the existing get_specificati
Then finally just added a quick test to make sure we get/don't get the right
specs when using the method.
== QA ==
Per the bug, having both public and non-public specs the owner should see
the non-public ones they have a grant to while the public only user should not
see them listed on the home page.
== Tests ==
New test in lib/lp/
The actual code is tested via a lot of other locations though.
