Merge lp:~stevenk/launchpad/change-bug-privacy-via-mail into lp:launchpad

Proposed by Steve Kowalik on 2012-03-01
Status: Merged
Approved by: William Grant on 2012-03-01
Approved revision: no longer in the source branch.
Merged at revision: 14888
Proposed branch: lp:~stevenk/launchpad/change-bug-privacy-via-mail
Merge into: lp:launchpad
Diff against target: 44 lines (+10/-1)
2 files modified
database/schema/security.cfg (+1/-1)
lib/lp/bugs/tests/bugs-emailinterface.txt (+9/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/change-bug-privacy-via-mail
Reviewer Review Type Date Requested Status
William Grant code 2012-03-01 Approve on 2012-03-01
Review via email: mp+95312@code.launchpad.net

Commit Message

[r=wgrant][bug=796733] Fix privacy flipping of bugs with attachments via the e-mail interface.

Description of the Change

We have had the ability to change the privacy of a bug via e-mail for a while now, but it doesn't test bugs with attachments, so of course it's broken due to a missing DB permission.

I've added the missing permission and added an attachment into the current test.

To post a comment you must log in.
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/security.cfg'
2--- database/schema/security.cfg 2012-02-24 07:39:20 +0000
3+++ database/schema/security.cfg 2012-03-01 05:32:21 +0000
4@@ -1716,7 +1716,7 @@
5 public.karma = SELECT, INSERT
6 public.karmaaction = SELECT
7 public.language = SELECT
8-public.libraryfilealias = SELECT, INSERT
9+public.libraryfilealias = SELECT, INSERT, UPDATE
10 public.libraryfilecontent = SELECT, INSERT
11 public.mergedirectivejob = SELECT, INSERT
12 public.message = SELECT, INSERT
13
14=== modified file 'lib/lp/bugs/tests/bugs-emailinterface.txt'
15--- lib/lp/bugs/tests/bugs-emailinterface.txt 2012-01-20 15:42:44 +0000
16+++ lib/lp/bugs/tests/bugs-emailinterface.txt 2012-03-01 05:32:21 +0000
17@@ -627,6 +627,11 @@
18
19 >>> subscription = bug_four.subscribe(bug_four.owner, bug_four.owner)
20
21+We will also add an attachment to the bug.
22+
23+ >>> bug_attachment = bug_four.addAttachment(
24+ ... bug_four.owner, 'Attachment', 'No comment', 'test.txt')
25+
26 >>> submit_commands(bug_four, 'private yes')
27 >>> bug_four.private
28 True
29@@ -642,12 +647,16 @@
30 datetime.datetime(...)
31 >>> bug_four.who_made_private.name
32 u'name12'
33+ >>> bug_attachment.libraryfile.restricted
34+ True
35
36 The bug report can also be made public:
37
38 >>> submit_commands(bug_four, 'private no')
39 >>> bug_four.private
40 False
41+ >>> bug_attachment.libraryfile.restricted
42+ False
43
44 The timestamp and user are cleared:
45