Merge lp:~cjohnston/launchpad/part-essential into lp:launchpad

Proposed by Chris Johnston
Status: Work in progress
Proposed branch: lp:~cjohnston/launchpad/part-essential
Merge into: lp:launchpad
Diff against target: 125 lines (+7/-63)
2 files modified
lib/lp/blueprints/stories/standalone/subscribing.txt (+3/-58)
lib/lp/security.py (+4/-5)
To merge this branch: bzr merge lp:~cjohnston/launchpad/part-essential
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+124559@code.launchpad.net

Commit message

Change to the wording of a blueprints participation essential to reflect changes that landed in Summit.

Description of the change

This changes the wording for participation essential of a blueprint to remove the part of the text that states that the scheduler will try to work around the persons availability. This has been changed in Summit to where a user will no longer be marked as required due to too much spam of people marking themselves required when they aren't actually required.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Wait, so it won't be used at all? Why not remove the option entirely then?

Revision history for this message
Curtis Hovey (sinzui) wrote :

The permission-level change to launchpad.Admin has no effect because the definition of who can make the change has not changed. Project drivers, blueprint goal drivers, the subscriber, and the people working on the blueprint can edit the essential flag.

Revision history for this message
Curtis Hovey (sinzui) wrote :

thank you.

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

The proper way to balance the parens was to add back the one at the start of the OR clause instead of removing the one for isOneOf(). I will fix this now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/blueprints/stories/standalone/subscribing.txt'
2--- lib/lp/blueprints/stories/standalone/subscribing.txt 2011-12-23 22:27:40 +0000
3+++ lib/lp/blueprints/stories/standalone/subscribing.txt 2012-09-17 23:49:19 +0000
4@@ -38,16 +38,6 @@
5 >>> back_link.url
6 'http://blueprints.launchpad.dev/firefox/+spec/e4x'
7
8-There should be a control to set whether or not participation in
9-discussions of this feature is essential. We will say we want to be
10-essential to this feature planning:
11-
12- >>> essential = browser.getControl('essential')
13- >>> essential.selected
14- False
15-
16- >>> essential.selected = True
17-
18 Now, we'll POST the form. We should see a message that we have just
19 subscribed.
20
21@@ -55,7 +45,7 @@
22 >>> 'You have subscribed to this blueprint' in browser.contents
23 True
24
25- >>> 'subscriber-essential' in browser.contents
26+ >>> 'subscriber-inessential' in browser.contents
27 True
28
29 Now the link should say "Update subscription" in the actions menu.
30@@ -64,53 +54,6 @@
31 >>> submod_link is not None
32 True
33
34-OK. Now, let's say we want to change the essential field. Let's follow
35-the link to modify the subscription. It should currently be checked.
36-
37- >>> submod_link.click()
38- >>> essential = browser.getControl('essential')
39- >>> essential.selected
40- True
41-
42-We will unset the essential flag and resubmit:
43-
44- >>> essential.selected = False
45- >>> browser.getControl('Change').click()
46- >>> 'Your subscription has been updated' in browser.contents
47- True
48-
49- >>> 'subscriber-inessential' in browser.contents
50- True
51-
52-It's also possible to change the essential flag clicking on the star
53-icon in the Subscribers portlet.
54-
55- >>> browser.getLink(url='/+subscription/carlos').click()
56- >>> browser.getControl('Participation essential').selected = True
57- >>> browser.getControl('Change').click()
58- >>> browser.url
59- 'http://blueprints.launchpad.dev/firefox/+spec/e4x'
60-
61- >>> 'subscriber-essential' in browser.contents
62- True
63-
64-We don't really want to be subscribed, so lets unsubscribe from that
65-spec. We click the remove icon in the subscribers list, and now the
66-unsubscribe confirmation page loads.
67-
68- >>> unsubit = browser.getLink(id='unsubscribe-subscriber-13')
69- >>> unsubit.click()
70- >>> confirm = browser.getControl('Unsubscribe')
71- >>> confirm.click()
72- >>> 'You have unsubscribed from this blueprint.' in browser.contents
73- True
74-
75- >>> 'subscriber-inessential' in browser.contents
76- False
77-
78- >>> 'subscriber-essential' in browser.contents
79- False
80-
81
82 Subscribing other users
83 -----------------------
84@@ -165,6 +108,7 @@
85 ... img = a_tags[0].first('img')
86 ... print img['src'],
87 ... print a_tags[1].string
88+ /@@/subscriber-inessential Carlos ...
89 /@@/subscriber-essential Stuart Bishop
90
91 When we change a user's subscription, they get notified by email. Teams
92@@ -190,6 +134,7 @@
93 ... img = a_tags[0].first('img')
94 ... print img['src'],
95 ... print a_tags[1].string
96+ /@@/subscriber-inessential Carlos ...
97 /@@/subscriber-inessential Stuart Bishop
98
99 And check the email notification too.
100
101=== modified file 'lib/lp/security.py'
102--- lib/lp/security.py 2012-09-07 20:33:10 +0000
103+++ lib/lp/security.py 2012-09-17 23:49:19 +0000
104@@ -640,8 +640,8 @@
105
106
107 class EditSpecificationSubscription(AuthorizationBase):
108- """The subscriber, and people related to the spec or the target of the
109- spec can determine who is essential."""
110+ """The people related to the spec or the target of the
111+ spec who can determine who is essential."""
112 permission = 'launchpad.Edit'
113 usedfor = ISpecificationSubscription
114
115@@ -652,10 +652,9 @@
116 else:
117 if user.isOneOfDrivers(self.obj.specification.target):
118 return True
119- return (user.inTeam(self.obj.person) or
120- user.isOneOf(
121+ return user.isOneOf(
122 self.obj.specification,
123- ['owner', 'drafter', 'assignee', 'approver']) or
124+ ['owner', 'drafter', 'assignee', 'approver'] or
125 user.in_admin)
126
127