Merge lp:~jcsackett/launchpad/no-private-releases into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | j.c.sackett | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 16362 | ||||
Proposed branch: | lp:~jcsackett/launchpad/no-private-releases | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
265 lines (+109/-2) 6 files modified
lib/lp/registry/browser/productrelease.py (+19/-0) lib/lp/registry/browser/tests/test_productrelease.py (+56/-0) lib/lp/registry/model/milestone.py (+6/-0) lib/lp/registry/templates/productrelease-add-from-series.pt (+7/-0) lib/lp/registry/templates/productrelease-add.pt (+7/-0) lib/lp/registry/tests/test_milestone.py (+14/-2) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/no-private-releases | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+139092@code.launchpad.net |
Commit message
Blocks making releases for private products and adds warning about public release for embargoed ones.
Description of the change
Summary
=======
Releases must be blocked for proprietary products as releases must be public.
For embargoed products, where releases may be part of unembargoing a project,
they are allowed but warn the user.
Preimp
======
Spoke with Deryck.
Implementation
==============
A check is made to forbid release creation on private products at the model
level, to prevent it happening over the API.
The AddRelease views gain a new method to check if releases are allowed; if
they are not, the template renders a message saying they are not rather than
rendering the form.
The AddRelease views, on initialize, check if the product is EMBARGOED. If so,
they add a warning notification explaining that the release will be public.
Tests
=====
bin/test -vvct NonPublicProduc
QA
==
Attempt creating releases for EMBARGOED and PROPRIETARY products. On
EMBARGOED, you should get a warning, but be able to create the release. On
PROPRIETARY, you should not get the form.
LoC
===
Part of private projects.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Looks good.