Merge lp:~michael.nelson/launchpad/506203-ppa-privatisation-check into lp:launchpad
Proposed by
Michael Nelson
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~michael.nelson/launchpad/506203-ppa-privatisation-check |
Merge into: | lp:launchpad |
Diff against target: |
287 lines (+179/-10) 5 files modified
lib/lp/soyuz/browser/archive.py (+8/-0) lib/lp/soyuz/browser/tests/test_archive_admin_view.py (+95/-0) lib/lp/soyuz/interfaces/archive.py (+10/-1) lib/lp/soyuz/model/archive.py (+17/-7) lib/lp/soyuz/tests/test_archive.py (+49/-2) |
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/506203-ppa-privatisation-check |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+19415@code.launchpad.net |
To post a comment you must log in.
= Summary =
This branch ensures that the privacy of a PPA cannot be changed once there are published sources for the PPA. It does so both on the model (ie. API usage) as well as on the view.
There will be a second branch following which will update a gazillion tests that switch the privacy of PPAs during tests. And then a third which will just update the UI to present a disabled checkbox when appropriate.
== Implementation details ==
I'd hoped to find a solution that would enable me to re-use the same validation code on both the model and the view (initially I thought a validation constraint defined on the interface might do the job, but it doesn't).
The only way I could see to reuse the code directly would be to add something like validateArchive Privacy( ) on the interface, but that doesn't seem sane either.
== Tests == acySwitching
To test:
bin/test -vvt TestArchivePriv
== Demo and Q/A ==
Visit: /launchpad. dev/~cprov/ +archive/ ppa
https:/
login as <email address hidden> and click on Administer archive, then try changing the checkbox.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: soyuz/browser/ tests/test_ archive_ admin_view. py soyuz/tests/ test_archive. py soyuz/interface s/archive. py soyuz/model/ archive. py soyuz/browser/ archive. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ soyuz/interface s/archive. py declarations' (No module named restful) fields' (No module named restful) newPackagesetUp loader] Operator not preceded by a space
41: [F0401] Unable to import 'lazr.enum' (No module named enum)
54: [F0401] Unable to import 'lazr.restful.
60: [F0401] Unable to import 'lazr.restful.
457: [C0322, IArchivePublic.
packageset= Reference( _("Explicit" ), required=False))
^
Interface, title=_("Package set"), required=True),
explicit=Bool(
title=
followed by a few dozen more of the same incorrect lint report?