Code review comment for lp:~jtv/launchpad/bug-487447

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

= 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.
 - Push a template and a translation to the branch. The template should have a message "translation-credits"
 - 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

« Back to merge proposal