Merge lp://staging/~jtv/launchpad/bug-592762 into lp://staging/launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 11019
Proposed branch: lp://staging/~jtv/launchpad/bug-592762
Merge into: lp://staging/launchpad
Diff against target: 66 lines (+32/-1)
2 files modified
database/schema/security.cfg (+1/-0)
lib/lp/translations/scripts/tests/test_translations_to_branch.py (+31/-1)
To merge this branch: bzr merge lp://staging/~jtv/launchpad/bug-592762
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+27390@code.staging.launchpad.net

Commit message

TeamMembership privilege for translationstobranch.

Description of the change

= Bug 592762 =

Sometimes the translations-to-branch exporter is asked to export translations to a bzr branch that doesn't exist. This is possible because the Code UI lets users "register" branches, which creates the branches in the database but not in bzr.

I fixed up the script to send out email notifications when this happens. But in Q/A I found that if the email recipient is a team, the email helpers need SELECT privileges for the TeamMembership table which the script currently lacks.

So here's the fix for that. As long as you don't re-build your schema first, this test reproduces the problem:
{{{
./bin/test -vv -t handleUnpushedBranch_is_privileged_to_contact_team
}}}

Run this to make the problem go away and the test pass:
{{{
./database/schema/security.py
}}}

To Q/A, all I have to do is inspect the logs on staging a day after this fix is rolled out and hopefully see the script complete successfully.

Jeroen

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.