Merge lp:~abentley/launchpad/transitive-confidential into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2012-11-23 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16306 |
| Proposed branch: | lp:~abentley/launchpad/transitive-confidential |
| Merge into: | lp:launchpad |
| Diff against target: |
394 lines (+99/-190) 6 files modified
lib/lp/registry/browser/product.py (+0/-41) lib/lp/registry/browser/tests/test_product.py (+0/-113) lib/lp/registry/model/product.py (+40/-13) lib/lp/registry/tests/test_milestone.py (+0/-21) lib/lp/registry/tests/test_product.py (+57/-0) lib/lp/translations/doc/translationsoverview.txt (+2/-2) |
| To merge this branch: | bzr merge lp:~abentley/launchpad/transitive-confidential |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Abel Deuring (community) | code | 2012-11-23 | Approve on 2012-11-23 |
| Aaron Bentley | Pending | ||
|
Review via email:
|
|||
This proposal supersedes a proposal from 2012-11-19.
Commit Message
Forbid non-proprietary artifacts when transitioning product to Proprietary
Description of the Change
= Summary =
Fix bug #1079785: public artifacts are permitted on confidential projects
== Proposed fix ==
Move checks from view to model, raise exceptions, include private non-proprietary types
== Pre-implementation notes ==
None
== LOC Rationale ==
Reduces LOC
== Implementation details ==
Revert 16258 and migrate code from getPublicWarning. Use early exit to separate on-change code from on-creation code.
Tweak to check for USERDATA and PRIVATESECURITY bugs.
Remove getPublicWarning and related code and tests.
== Tests ==
bin/test -t test_change_
== Demo and Q/A ==
Create a public product with other/proprietary license. Create a public branch, bug, blueprint. Enable translations. You should not be able to change its information type to proprietary until you've made all artifacts private and disabled translations.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
| Abel Deuring (adeuring) wrote : | # |
Looks good to land.
I just have concern: If we assume that somebody creates a public project, adds public bugs, branches, specifications, links packages and enables translations.
If this person decides to make product proprietary, the user experience is terrible:
The first error is "sorry, no public specs allowed", so the user changes the specifications.
The next error then is "sorry, no public bugs allowed" and so on. It would be better to collect all "show stoppers" and tell the user immediately that they have to fix issues with bugs, branches, specs, translations and packages.
| Aaron Bentley (abentley) wrote : | # |
I have a plan to show all validation error at form validation time, which I'll pursue in a follow-up branch.
| William Grant (wgrant) wrote : | # |
Translations must not exist at all, not just be disabled. Answers must also not exist.
There's also some arbitrary capitalisation here:
274 + raise CommercialSubsc
275 + 'A valid commercial subscription is required for private'
276 + ' Projects.')
| Aaron Bentley (abentley) wrote : | # |
> Translations must not exist at all, not just be disabled. Answers must also
> not exist.
I know this, and I've already started work on addressing that. See bug #1082422 and branch lp:~abentley/launchpad/more-transition-checks. Please add any checks that I've missed to that bug.
> There's also some arbitrary capitalisation here:
>
> 274 + raise CommercialSubsc
> 275 + 'A valid commercial subscription is required for private'
> 276 + ' Projects.')
True, but I only moved that code around.

Further discussion with Curtis reveals that only Proprietary and Embargoed artefacts should be permitted when transitioning product to proprietary/ embargoed. See bug.