Merge lp:~rharding/launchpad/changing_maintainer_1077841 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Richard Harding on 2012-12-04 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16341 |
| Proposed branch: | lp:~rharding/launchpad/changing_maintainer_1077841 |
| Merge into: | lp:launchpad |
| Diff against target: |
102 lines (+12/-8) 6 files modified
lib/lp/app/templates/inline-picker.pt (+1/-1) lib/lp/registry/configure.zcml (+1/-2) lib/lp/registry/interfaces/product.py (+7/-1) lib/lp/registry/model/product.py (+0/-4) lib/lp/registry/stories/webservice/xx-project-registry.txt (+1/-0) lib/lp/registry/tests/test_product.py (+2/-0) |
| To merge this branch: | bzr merge lp:~rharding/launchpad/changing_maintainer_1077841 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Abel Deuring (community) | code | 2012-12-04 | Approve on 2012-12-04 |
|
Review via email:
|
|||
Commit Message
Add private property to Product so that it has LP.cache.
Description of the Change
= Summary =
The bug is that the JavaScript in the picker is throwing an invalid message to
the user when they change the maintainer of a project. In looking, this is
because that JavaScript it determine if things are private by looking at
LP.cache.
== Pre Implementation ==
Talked with Abel some during implementation to debug .zcml work.
== Implementation Notes ==
The trick here is in the IProduct interface through IInformationType and from
IPrivacy. However, it's not exported so it doesn't get dumped with the rest of
the Product data into LP.cache.context when you're on the product home screen.
To fix this, I added the property to the IProductPublic interface and removed
the IInformationType from the zcml. I then had to allow the attribute
IInformationType was supplying. This basically hid away the private from
IPrivacy, but exposed my updated one in IProjectPublic.
The private method on the Product model is just a simple check against
PRIVATE_
== Tests ==
For testing, I just updated the existing information type tests to not only
verify it gets the right information type, but that the private property is
correct.
The JavaScript is correct as long as the context is correct so there aren't
any changes actually required in there.
