Merge lp:~abentley/launchpad/limit-product-info-types into lp:launchpad
| Status: | Merged |
|---|---|
| Merged at revision: | 16085 |
| Proposed branch: | lp:~abentley/launchpad/limit-product-info-types |
| Merge into: | lp:launchpad |
| Diff against target: |
197 lines (+103/-8) 3 files modified
lib/lp/registry/model/product.py (+30/-2) lib/lp/registry/tests/test_product.py (+71/-5) lib/lp/scripts/tests/test_garbo.py (+2/-1) |
| To merge this branch: | bzr merge lp:~abentley/launchpad/limit-product-info-types |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Deryck Hodge (community) | 2012-10-03 | Approve on 2012-10-03 | |
|
Review via email:
|
|||
Commit Message
Ensure only valid Product.
Description of the Change
= Summary =
Ensure only valid information_types are used for Product.
== Proposed fix ==
Use a Storm validator for Product.
== Pre-implementation notes ==
Discussed with deryck
== LOC Rationale ==
Part of Private Projects
== Implementation details ==
The storm validator ensures that values outside PUBLIC_PROPRIETARY are not accepted. For mutations, it ensures that PROPRIETARY values can only be set if there is a commercial subscription. For creation, createProject ensures that PROPRIETARY values are only used with Other/Proprietary licenses, which imply a commercial subscription.
== Tests ==
bin/test -t TestProduct registry.
== Demo and Q/A ==
Modifying an existing Product should not complain about a NULL information_type.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/

Looks nice. I like the use of the storm validator here.