Merge lp://qastaging/~jtv/launchpad/bug-487447 into lp://qastaging/launchpad
Proposed by
Jeroen T. Vermeulen
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp://qastaging/~jtv/launchpad/bug-487447 |
Merge into: | lp://qastaging/launchpad |
Prerequisite: | lp://qastaging/~jtv/launchpad/bug-488218 |
Diff against target: |
357 lines (+120/-67) 10 files modified
database/schema/security.cfg (+25/-23) lib/lp/testing/factory.py (+0/-1) lib/lp/translations/browser/potemplate.py (+6/-5) lib/lp/translations/interfaces/pofile.py (+3/-0) lib/lp/translations/interfaces/potemplate.py (+1/-2) lib/lp/translations/model/pofile.py (+13/-16) lib/lp/translations/model/potemplate.py (+5/-11) lib/lp/translations/model/translationimportqueue.py (+3/-2) lib/lp/translations/scripts/tests/test_message_sharing_migration.py (+3/-1) lib/lp/translations/tests/test_autoapproval.py (+61/-6) |
To merge this branch: | bzr merge lp://qastaging/~jtv/launchpad/bug-487447 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+15315@code.qastaging.launchpad.net |
Commit message
Reorganize database permissions for Translations approval. Factor canEditTranslations out of newPOFile.
To post a comment you must log in.
= Bugs 443129, 487447 =
We were getting some database permission errors as the two scripts that approve translations uploads created new POFiles. This has been happening a lot lately, particularly because of a fairly pointless permissions check in initializing the owner of a new POFile. POFile.owner pretty much unused anyway.
This branch does the following:
* Reorganizes database permissions by creating a single group for "anything that approves translations uploads."
* Lifts the setting of POFile.owner out of newPOFile and into the caller—along with the check to see whether that person is qualified to be the owner.
* Gets rid of the parameter that told newPOFile what owner to set (if qualified).
* Hoists some related IPOFile methods from POFile and DummyPOFile into their common base class.
* Always makes rosetta_experts the owner of POFiles created by the approver (instead of the uploader).
* Tests for the database privileges necessary for approving a POFile.
No lint. Main test is test_autoapproval. Q/A procedure on staging:
- Set up a project for translation, including an import branch. credits"
- Push a template and a translation to the branch. The template should have a message "translation-
- See that the template and the translation get approved & imported.
- Manually upload another translation for the same template.
- See this get approved & imported as well.
Jeroen