Merge lp:~henninge/launchpad/bug-515680-status into lp:launchpad
Proposed by
Henning Eggers
Status: | Merged |
---|---|
Approved by: | Henning Eggers |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~henninge/launchpad/bug-515680-status |
Merge into: | lp:launchpad |
Diff against target: |
217 lines (+80/-48) 4 files modified
lib/canonical/launchpad/security.py (+6/-20) lib/lp/translations/interfaces/translationimportqueue.py (+5/-9) lib/lp/translations/model/translationimportqueue.py (+26/-14) lib/lp/translations/tests/test_translationimportqueue.py (+43/-5) |
To merge this branch: | bzr merge lp:~henninge/launchpad/bug-515680-status |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eleanor Berger (community) | code | Approve | |
Review via email: mp+18517@code.launchpad.net |
Commit message
Translation importers cannot set their queue entry to Blocked now.
To post a comment you must log in.
= 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.