The goal of this branch is to restrict access to the BLOCKED status to project owners and drivers (and admins, of course). The uploader should not be able to set their entry to BLOCKED.
== Proposed fix ==
Update TranslationImportQueueEntry.canSetStatus to disallow importers to set BLOCKED which it currently allows.
== Implementation details ==
I used this oportunity to update some very specific "is*" methods to be called "canEdit" and "canAdmin" and behave accordingly. This also changed their use in security.py.
== Test ==
./bin/test -vvct TestCanSetStatus
== Demo/QA ==
As the member of a translation team but not the owner or driver of the project, upload a file to a project. Go to them import queue and check that "Blocked" is not available to you. Go there as the maintainer or driver of the project and you can set it.
As a corner case, upload a file as the maintainer, Blocked should still be available.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
lib/lp/translations/interfaces/translationimportqueue.py
10: [F0401] Unable to import 'lazr.enum' (No module named enum)
20: [F0401] Unable to import 'lazr.restful.interface' (No module named restful)
21: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
22: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
= Bug 515680 =
The goal of this branch is to restrict access to the BLOCKED status to project owners and drivers (and admins, of course). The uploader should not be able to set their entry to BLOCKED.
== Proposed fix ==
Update TranslationImpo rtQueueEntry. canSetStatus to disallow importers to set BLOCKED which it currently allows.
== Implementation details ==
I used this oportunity to update some very specific "is*" methods to be called "canEdit" and "canAdmin" and behave accordingly. This also changed their use in security.py.
== Test ==
./bin/test -vvct TestCanSetStatus
== Demo/QA ==
As the member of a translation team but not the owner or driver of the project, upload a file to a project. Go to them import queue and check that "Blocked" is not available to you. Go there as the maintainer or driver of the project and you can set it.
As a corner case, upload a file as the maintainer, Blocked should still be available.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ security. py translations/ interfaces/ translationimpo rtqueue. py translations/ model/translati onimportqueue. py translations/ tests/test_ translationimpo rtqueue. py
lib/canonical
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ translations/ interfaces/ translationimpo rtqueue. py interface' (No module named restful) fields' (No module named restful) declarations' (No module named restful)
10: [F0401] Unable to import 'lazr.enum' (No module named enum)
20: [F0401] Unable to import 'lazr.restful.
21: [F0401] Unable to import 'lazr.restful.
22: [F0401] Unable to import 'lazr.restful.