Merge lp:~abentley/launchpad/no-private-translations into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 16329 |
Proposed branch: | lp:~abentley/launchpad/no-private-translations |
Merge into: | lp:launchpad |
Diff against target: |
479 lines (+237/-42) 10 files modified
lib/lp/registry/browser/product.py (+2/-1) lib/lp/registry/model/product.py (+23/-5) lib/lp/registry/model/productseries.py (+14/-1) lib/lp/registry/tests/test_product.py (+57/-30) lib/lp/registry/tests/test_productseries.py (+22/-2) lib/lp/translations/browser/product.py (+5/-0) lib/lp/translations/browser/tests/test_product_view.py (+72/-1) lib/lp/translations/browser/tests/test_productseries.py (+40/-0) lib/lp/translations/templates/product-portlet-translatables.pt (+1/-1) lib/lp/translations/templates/productseries-translations-settings.pt (+1/-1) |
To merge this branch: | bzr merge lp:~abentley/launchpad/no-private-translations |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | Approve | ||
Review via email: mp+137316@code.launchpad.net |
Commit message
Prevent translations for private products.
Description of the change
= Summary =
Fix bug #1083199: translations can be enabled for private projects
== Proposed fix ==
Fix issues at the model and view level
== Pre-implementation notes ==
None
== LOC Rationale ==
Part of Private Projects
== Implementation details ==
Partial rollback of r16196 because it assumes that private products can have translations. (This is the getTranslatables filtering)
=== Model level ===
Make it impossible to make a product if:
- it has queued translations
- it has any productseries with autoimports enabled
(This validation also applies to the view)
Introduce a Storm validator for Product.
Introduce a Storm validator for ProductSeries.
TranslationsBra
=== View level ===
Remove ServiceUsage.
Hide links to the productseries translation settings for private products.
Remove import/export settings for private productseries.
== Tests ==
bin/test -t test_private_
== Demo and Q/A ==
- Create a product.
- Enable translations.
- Enable automatic imports to trunk.
- Attempt to set the product to proprietary.
- You should receive errors about the fact that translations and auto-imports are enabled.
- Disable translations and automatic imports.
- Set the product to proprietary.
- You should no longer have the option to enable translations.
- The links to the productseries pages should be gone.
- If you URL-hack to the productseries pages, the UI should be gone.
= 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/
Hi Aaron,
On IRC we discussed the term 'private' vs. 'proprietary' in user-visible messages. I think you agreed they should all be 'proprietary'.
Otherwise it looks good.