Merge lp:~abentley/launchpad/no-proprietary-linked-products into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16142 |
Proposed branch: | lp:~abentley/launchpad/no-proprietary-linked-products |
Merge into: | lp:launchpad |
Diff against target: |
551 lines (+217/-16) 16 files modified
lib/lp/registry/browser/product.py (+7/-1) lib/lp/registry/browser/productseries.py (+6/-2) lib/lp/registry/browser/sourcepackage.py (+11/-1) lib/lp/registry/browser/tests/test_product.py (+18/-1) lib/lp/registry/browser/tests/test_productseries_views.py (+32/-1) lib/lp/registry/browser/tests/test_sourcepackage_views.py (+38/-1) lib/lp/registry/errors.py (+5/-0) lib/lp/registry/model/packaging.py (+15/-3) lib/lp/registry/model/product.py (+2/-0) lib/lp/registry/model/productseries.py (+2/-2) lib/lp/registry/model/sourcepackage.py (+2/-2) lib/lp/registry/templates/productseries-index.pt (+2/-1) lib/lp/registry/tests/test_packaging.py (+25/-0) lib/lp/registry/tests/test_product.py (+12/-0) lib/lp/registry/tests/test_productseries.py (+26/-1) lib/lp/registry/tests/test_sourcepackage.py (+14/-0) |
To merge this branch: | bzr merge lp:~abentley/launchpad/no-proprietary-linked-products |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | Approve | ||
Review via email: mp+129507@code.launchpad.net |
Commit message
No packaging links for Proprietary products.
Description of the change
= Summary =
Fix bug #1063297: Linking a private project to an ubuntu source package breaks Ubuntu
== Proposed fix ==
Prevent creating packaging links for private products, prevent making packaged products proprietary
== Pre-implementation notes ==
None
== LOC Rationale ==
Part of Private Projects
== Implementation details ==
The restrictions are implemented on the model level, and the errors it emits are handled as user errors in the UI.
ProductSeries.
PackagingUtil.
CannotPackagePr
PackagingUtil.
ProductEditView is updated to handle CannotChangeInf
ProductSeries is updated to add an error to the main page if CannotPackagePr
The validator for SourcePackageCh
The packaging portal is hidden for private product series. (They should not have packagings, and should not be able to set them.)
== Tests ==
bin/test -t test_no_
== Demo and Q/A ==
Create a product series with a public project. Click on "trunk". Click on "Link to Ubuntu package". In another browser window, edit the project and set it to Proprietary. Enter a source package name and series. Click "Update". It should say "Only Public project series can be packaged, not Proprietary."
Go to a source package. Click "Choose another upstream project". Click "Link to Upstream Project". Enter the name of a proprietary product. It should say "Only Public project series can be packaged, not Proprietary."
Disable JavaScript. Create a public product and link its trunk to a source package. Click "Change details." Select "Proprietary". Click "change". It should say "Some series are packaged."
= 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/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Looks good to me.