Merge lp:~stevenk/launchpad/destroy-old-privacy-ui into lp:launchpad

Proposed by Steve Kowalik on 2012-06-26
Status: Merged
Approved by: Steve Kowalik on 2012-06-26
Approved revision: no longer in the source branch.
Merged at revision: 15494
Proposed branch: lp:~stevenk/launchpad/destroy-old-privacy-ui
Merge into: lp:launchpad
Diff against target: 1619 lines (+126/-616)
33 files modified
database/sampledata/current-dev.sql (+0/-1)
lib/lp/app/browser/informationtype.py (+0/-6)
lib/lp/bugs/browser/bug.py (+8/-105)
lib/lp/bugs/browser/bugtarget.py (+18/-58)
lib/lp/bugs/browser/bugtask.py (+3/-7)
lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt (+4/-6)
lib/lp/bugs/browser/tests/test_bug_views.py (+8/-65)
lib/lp/bugs/browser/tests/test_bugtarget_filebug.py (+16/-26)
lib/lp/bugs/browser/tests/test_bugtask.py (+3/-5)
lib/lp/bugs/javascript/bugtask_index.js (+1/-43)
lib/lp/bugs/javascript/filebug.js (+1/-20)
lib/lp/bugs/javascript/information_type_choice.js (+1/-6)
lib/lp/bugs/javascript/tests/test_filebug.js (+0/-5)
lib/lp/bugs/javascript/tests/test_information_type_choice.js (+0/-1)
lib/lp/bugs/stories/bug-also-affects/xx-also-affects-upstream-private-bug.txt (+1/-6)
lib/lp/bugs/stories/bug-privacy/xx-bug-privacy.txt (+4/-20)
lib/lp/bugs/stories/bug-privacy/xx-presenting-private-bugs.txt (+6/-8)
lib/lp/bugs/stories/bugs/xx-bug-activity.txt (+6/-19)
lib/lp/bugs/stories/bugs/xx-duplicate-of-private-bug.txt (+2/-3)
lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt (+4/-10)
lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt (+3/-4)
lib/lp/bugs/stories/initial-bug-contacts/xx-initial-bug-contacts.txt (+2/-4)
lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt (+2/-16)
lib/lp/bugs/templates/bug-portlet-privacy.pt (+0/-22)
lib/lp/bugs/templates/bugtarget-filebug-guidelines.pt (+0/-39)
lib/lp/code/browser/branch.py (+3/-34)
lib/lp/code/browser/tests/test_branch.py (+14/-24)
lib/lp/code/stories/branches/xx-branch-edit-privacy.txt (+10/-20)
lib/lp/code/stories/branches/xx-branch-index.txt (+1/-1)
lib/lp/code/stories/branches/xx-branch-listings.txt (+2/-3)
lib/lp/code/stories/branches/xx-bug-branch-links.txt (+3/-4)
lib/lp/code/templates/branch-portlet-privacy.pt (+0/-12)
lib/lp/services/features/flags.py (+0/-13)
To merge this branch: bzr merge lp:~stevenk/launchpad/destroy-old-privacy-ui
Reviewer Review Type Date Requested Status
Ian Booth (community) 2012-06-26 Approve on 2012-06-26
Review via email: mp+112002@code.launchpad.net

Commit Message

Remove the old privacy UI for bugs and branches and drop the two feature flags that were related.

Description of the Change

Remove the old privacy UI from the code, and fix up/delete a bunch of tests. To be frank, I'm not sure if I've hit everything, but there is a bunch marked for the chopping block (BugVisibilityChange and BugSecurityChange prime among those.)

I've removed the XXX from BugSecrecyEditView, because changing it to make use of LEFV tries to shoehorn it into IBugTask, and that interface does not have an information_type.

To post a comment you must log in.
Ian Booth (wallyworld) wrote :

Looks pretty good. As discussed, change field_names properties to attributes. Approved on the following proviso:

There is a regression and I'd like a bug raised to fix it so that we remember to fix it. Making a bug private can and does change the subscribers list. Previously these changes were returned to the ajax caller so the subscribers portlet could be updated. We have lost that functionality and now the user is forced to refresh the page to see any subscriber changes.

review: Approve
Ian Booth (wallyworld) wrote :

Ah, also, for this bit, it would be good to use extra_data.information_type to replace the old 'private'

371 - if (not bool(getFeatureFlag(
372 - 'disclosure.show_information_type_in_ui.enabled')) and
373 - extra_data.private):
374 - if params.information_type == InformationType.PUBLIC:
375 + if extra_data.private:
376 + if params.information_type in PUBLIC_INFORMATION_TYPES:

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/sampledata/current-dev.sql'
2--- database/sampledata/current-dev.sql 2012-06-22 06:12:53 +0000
3+++ database/sampledata/current-dev.sql 2012-06-26 06:02:24 +0000
4@@ -4301,7 +4301,6 @@
5 INSERT INTO featureflag (scope, priority, flag, value, date_modified) VALUES ('default', 0, 'disclosure.enhanced_sharing.writable', 'true', '2012-05-18 07:34:39.239649');
6 INSERT INTO featureflag (scope, priority, flag, value, date_modified) VALUES ('default', 0, 'disclosure.enhanced_sharing_details.enabled', 'true', '2012-05-18 07:34:39.239649');
7 INSERT INTO featureflag (scope, priority, flag, value, date_modified) VALUES ('default', 0, 'disclosure.information_type_notifications.enabled', 'true', '2012-05-18 07:34:39.239649');
8-INSERT INTO featureflag (scope, priority, flag, value, date_modified) VALUES ('default', 0, 'disclosure.show_information_type_in_ui.enabled', 'true', '2012-05-18 07:34:39.239649');
9 INSERT INTO featureflag (scope, priority, flag, value, date_modified) VALUES ('default', 0, 'js.combo_loader.enabled', 'true', '2012-05-18 07:34:39.239649');
10 INSERT INTO featureflag (scope, priority, flag, value, date_modified) VALUES ('default', 1, 'longpoll.merge_proposals.enabled', 'true', '2012-05-18 07:34:39.239649');
11
12
13=== modified file 'lib/lp/app/browser/informationtype.py'
14--- lib/lp/app/browser/informationtype.py 2012-06-07 15:22:52 +0000
15+++ lib/lp/app/browser/informationtype.py 2012-06-26 06:02:24 +0000
16@@ -27,16 +27,10 @@
17 for term in InformationTypeVocabulary()]
18 cache.objects['private_types'] = [
19 type.title for type in PRIVATE_INFORMATION_TYPES]
20- cache.objects['show_information_type_in_ui'] = (
21- self.show_information_type_in_ui)
22 cache.objects['show_userdata_as_private'] = (
23 self.show_userdata_as_private)
24
25 @property
26- def show_information_type_in_ui(self):
27- raise NotImplementedError()
28-
29- @property
30 def show_userdata_as_private(self):
31 return bool(getFeatureFlag(
32 'disclosure.display_userdata_as_private.enabled'))
33
34=== modified file 'lib/lp/bugs/browser/bug.py'
35--- lib/lp/bugs/browser/bug.py 2012-05-30 05:04:40 +0000
36+++ lib/lp/bugs/browser/bug.py 2012-06-26 06:02:24 +0000
37@@ -35,13 +35,8 @@
38 )
39 from lazr.lifecycle.event import ObjectModifiedEvent
40 from lazr.lifecycle.snapshot import Snapshot
41-from lazr.restful import (
42- EntryResource,
43- ResourceJSONEncoder,
44- )
45 from lazr.restful.interface import copy_field
46 from lazr.restful.interfaces import IJSONRequestCache
47-from simplejson import dumps
48 from zope import formlib
49 from zope.app.form.browser import TextWidget
50 from zope.component import getUtility
51@@ -65,8 +60,6 @@
52 from lp.app.errors import NotFoundError
53 from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription
54 from lp.app.widgets.project import ProjectScopeWidget
55-from lp.bugs.adapters.bug import convert_to_information_type
56-from lp.bugs.browser.bugsubscription import BugPortletSubscribersWithDetails
57 from lp.bugs.browser.widgets.bug import BugTagsWidget
58 from lp.bugs.enums import BugNotificationLevel
59 from lp.bugs.interfaces.bug import (
60@@ -81,7 +74,6 @@
61 from lp.bugs.interfaces.bugtask import (
62 BugTaskSearchParams,
63 BugTaskStatus,
64- IBugTask,
65 IFrontPageBugTaskSearch,
66 )
67 from lp.bugs.interfaces.bugwatch import IBugWatchSet
68@@ -91,12 +83,8 @@
69 from lp.bugs.model.structuralsubscription import (
70 get_structural_subscriptions_for_bug,
71 )
72-from lp.registry.enums import (
73- InformationType,
74- PRIVATE_INFORMATION_TYPES,
75- )
76+from lp.registry.enums import PRIVATE_INFORMATION_TYPES
77 from lp.registry.vocabularies import InformationTypeVocabulary
78-from lp.services.features import getFeatureFlag
79 from lp.services.fields import DuplicateBug
80 from lp.services.librarian.browser import ProxiedLibraryFileAlias
81 from lp.services.mail.mailwrapper import MailWrapper
82@@ -531,11 +519,6 @@
83 all the pages off IBugTask instead of IBug.
84 """
85
86- @property
87- def show_information_type_in_ui(self):
88- return bool(getFeatureFlag(
89- 'disclosure.show_information_type_in_ui.enabled'))
90-
91 @cachedproperty
92 def page_description(self):
93 return IBug(self.context).description
94@@ -817,80 +800,39 @@
95 self.updateBugFromData(data)
96
97
98-# XXX: This can move to using LaunchpadEditFormView when
99-# show_information_type_in_ui is removed.
100 class BugSecrecyEditView(LaunchpadFormView, BugSubscriptionPortletDetails):
101 """Form for marking a bug as a private/public."""
102
103 @property
104 def label(self):
105- label = 'Bug #%i - Set ' % self.context.bug.id
106- if bool(getFeatureFlag(
107- 'disclosure.show_information_type_in_ui.enabled')):
108- label += 'information type'
109- else:
110- label += 'visibility and security'
111- return label
112+ return 'Bug #%i - Set information type' % self.context.bug.id
113
114 page_title = label
115
116- @property
117- def field_names(self):
118- if bool(getFeatureFlag(
119- 'disclosure.show_information_type_in_ui.enabled')):
120- return ['information_type']
121- else:
122- return ['private', 'security_related']
123+ field_names = ['information_type']
124
125 custom_widget('information_type', LaunchpadRadioWidgetWithDescription)
126
127 @property
128 def schema(self):
129 """Schema for editing the information type of a `IBug`."""
130- class privacy_schema(Interface):
131- private_field = copy_field(IBug['private'], readonly=False)
132- security_related_field = copy_field(
133- IBug['security_related'], readonly=False)
134-
135 class information_type_schema(Interface):
136 information_type_field = copy_field(
137 IBug['information_type'], readonly=False,
138 vocabulary=InformationTypeVocabulary())
139- if bool(getFeatureFlag(
140- 'disclosure.show_information_type_in_ui.enabled')):
141- return information_type_schema
142- else:
143- return privacy_schema
144-
145- def setUpFields(self):
146- """See `LaunchpadFormView`."""
147- super(BugSecrecyEditView, self).setUpFields()
148- if not bool(getFeatureFlag(
149- 'disclosure.show_information_type_in_ui.enabled')):
150- bug = self.context.bug
151- if (bug.information_type == InformationType.PROPRIETARY
152- and len(bug.affected_pillars) > 1):
153- self.form_fields = self.form_fields.omit('private')
154+ return information_type_schema
155
156 @property
157 def next_url(self):
158 """Return the next URL to call when this call completes."""
159- if not self.request.is_ajax:
160- return canonical_url(self.context)
161- return None
162+ return canonical_url(self.context)
163
164 cancel_url = next_url
165
166 @property
167 def initial_values(self):
168 """See `LaunchpadFormView.`"""
169- if bool(getFeatureFlag(
170- 'disclosure.show_information_type_in_ui.enabled')):
171- return {'information_type': self.context.bug.information_type}
172- else:
173- return {
174- 'private': self.context.bug.private,
175- 'security_related': self.context.bug.security_related}
176+ return {'information_type': self.context.bug.information_type}
177
178 @action('Change', name='change')
179 def change_action(self, action, data):
180@@ -898,20 +840,8 @@
181 data = dict(data)
182 bug = self.context.bug
183 bug_before_modification = Snapshot(bug, providing=providedBy(bug))
184- if bool(getFeatureFlag(
185- 'disclosure.show_information_type_in_ui.enabled')):
186- information_type = data.pop('information_type')
187- changed_fields = ['information_type']
188- else:
189- changed_fields = []
190- private = data.pop('private', bug.private)
191- if bug.private != private:
192- changed_fields.append('private')
193- security_related = data.pop('security_related')
194- if bug.security_related != security_related:
195- changed_fields.append('security_related')
196- information_type = convert_to_information_type(
197- private, security_related)
198+ information_type = data.pop('information_type')
199+ changed_fields = ['information_type']
200 user_will_be_subscribed = (
201 information_type in PRIVATE_INFORMATION_TYPES and
202 bug.getSubscribersForPerson(self.user).is_empty())
203@@ -923,33 +853,6 @@
204 ObjectModifiedEvent(
205 bug, bug_before_modification, changed_fields,
206 user=self.user))
207- if self.request.is_ajax:
208- if changed:
209- return self._getSubscriptionDetails()
210- else:
211- return ''
212-
213- def _getSubscriptionDetails(self):
214- cache = dict()
215- # The subscription details for the current user.
216- self.extractBugSubscriptionDetails(self.user, self.context.bug, cache)
217-
218- # The subscription details for other users to populate the subscribers
219- # list in the portlet.
220- if IBugTask.providedBy(self.context):
221- bug = self.context.bug
222- else:
223- bug = self.context
224- subscribers_portlet = BugPortletSubscribersWithDetails(
225- bug, self.request)
226- subscription_data = subscribers_portlet.subscriber_data
227- result_data = dict(
228- cache_data=cache,
229- subscription_data=subscription_data)
230- self.request.response.setHeader('content-type', 'application/json')
231- return dumps(
232- result_data, cls=ResourceJSONEncoder,
233- media_type=EntryResource.JSON_TYPE)
234
235 def _handlePrivacyChanged(self, user_will_be_subscribed):
236 """Handle the case where the privacy of the bug has been changed.
237
238=== modified file 'lib/lp/bugs/browser/bugtarget.py'
239--- lib/lp/bugs/browser/bugtarget.py 2012-06-12 22:17:49 +0000
240+++ lib/lp/bugs/browser/bugtarget.py 2012-06-26 06:02:24 +0000
241@@ -121,6 +121,7 @@
242 from lp.registry.enums import (
243 InformationType,
244 PRIVATE_INFORMATION_TYPES,
245+ PUBLIC_INFORMATION_TYPES,
246 SECURITY_INFORMATION_TYPES,
247 )
248 from lp.registry.interfaces.distribution import IDistribution
249@@ -257,17 +258,9 @@
250 schema = IBug
251
252 @property
253- def show_information_type_in_ui(self):
254- return bool(getFeatureFlag(
255- 'disclosure.show_information_type_in_ui.enabled'))
256-
257- @property
258 def field_names(self):
259 """Return the list of field names to display."""
260- if self.show_information_type_in_ui:
261- return ['information_type']
262- else:
263- return ['security_related']
264+ return ['information_type']
265
266 custom_widget('information_type', LaunchpadRadioWidgetWithDescription)
267
268@@ -276,8 +269,6 @@
269 cache = IJSONRequestCache(self.request)
270 cache.objects['private_types'] = [
271 type.name for type in PRIVATE_INFORMATION_TYPES]
272- cache.objects['show_information_type_in_ui'] = (
273- self.show_information_type_in_ui)
274 cache.objects['show_userdata_as_private'] = bool(getFeatureFlag(
275 'disclosure.display_userdata_as_private.enabled'))
276 cache.objects['bug_private_by_default'] = (
277@@ -307,30 +298,20 @@
278 """Set up the form fields. See `LaunchpadFormView`."""
279 super(FileBugReportingGuidelines, self).setUpFields()
280
281- if self.show_information_type_in_ui:
282- information_type_field = copy_field(
283- IBug['information_type'], readonly=False,
284- vocabulary=InformationTypeVocabulary(self.context))
285- self.form_fields = self.form_fields.omit('information_type')
286- self.form_fields += Fields(information_type_field)
287- else:
288- security_related_field = copy_field(
289- IBug['security_related'], readonly=False)
290- self.form_fields = self.form_fields.omit('security_related')
291- self.form_fields += Fields(security_related_field)
292+ information_type_field = copy_field(
293+ IBug['information_type'], readonly=False,
294+ vocabulary=InformationTypeVocabulary(self.context))
295+ self.form_fields = self.form_fields.omit('information_type')
296+ self.form_fields += Fields(information_type_field)
297
298 @property
299 def initial_values(self):
300 """See `LaunchpadFormView`."""
301- if self.show_information_type_in_ui:
302- value = InformationType.PUBLIC
303- if (
304- self.context and IProduct.providedBy(self.context) and
305- self.context.private_bugs):
306- value = InformationType.USERDATA
307- return {'information_type': value}
308- else:
309- return {}
310+ value = InformationType.PUBLIC
311+ if (self.context and IProduct.providedBy(self.context) and
312+ self.context.private_bugs):
313+ value = InformationType.USERDATA
314+ return {'information_type': value}
315
316 @property
317 def bug_reporting_guidelines(self):
318@@ -454,15 +435,9 @@
319 def field_names(self):
320 """Return the list of field names to display."""
321 context = self.context
322- field_names = ['title', 'comment', 'tags']
323- if bool(getFeatureFlag(
324- 'disclosure.show_information_type_in_ui.enabled')):
325- field_names.append('information_type')
326- else:
327- field_names.append('security_related')
328- field_names.extend([
329+ field_names = ['title', 'comment', 'tags', 'information_type',
330 'bug_already_reported_as', 'filecontent', 'patch',
331- 'attachment_description', 'subscribe_to_existing_bug'])
332+ 'attachment_description', 'subscribe_to_existing_bug']
333 if (IDistribution.providedBy(context) or
334 IDistributionSourcePackage.providedBy(context)):
335 field_names.append('packagename')
336@@ -635,12 +610,8 @@
337 title = data["title"]
338 comment = data["comment"].rstrip()
339 packagename = data.get("packagename")
340- if bool(getFeatureFlag(
341- 'disclosure.show_information_type_in_ui.enabled')):
342- information_type = data.get(
343- "information_type", InformationType.PUBLIC)
344- else:
345- security_related = data.get("security_related", False)
346+ information_type = data.get(
347+ "information_type", InformationType.PUBLIC)
348 distribution = data.get(
349 "distribution", getUtility(ILaunchBag).distribution)
350
351@@ -659,15 +630,6 @@
352 if self.request.form.get("packagename_option") == "none":
353 packagename = None
354
355- if not bool(getFeatureFlag(
356- 'disclosure.show_information_type_in_ui.enabled')):
357- # If the old UI is enabled, security bugs are always embargoed
358- # when filed, but can be disclosed after they've been reported.
359- if security_related:
360- information_type = InformationType.EMBARGOEDSECURITY
361- else:
362- information_type = InformationType.PUBLIC
363-
364 linkified_ack = structured(FormattersAPI(
365 self.getAcknowledgementMessage(self.context)).text_to_html(
366 last_paragraph_class="last"))
367@@ -703,10 +665,8 @@
368 notifications.append(
369 'Additional information was added to the bug description.')
370
371- if (not bool(getFeatureFlag(
372- 'disclosure.show_information_type_in_ui.enabled')) and
373- extra_data.private):
374- if params.information_type == InformationType.PUBLIC:
375+ if extra_data.private:
376+ if params.information_type in PUBLIC_INFORMATION_TYPES:
377 params.information_type = InformationType.USERDATA
378
379 # Apply any extra options given by privileged users.
380
381=== modified file 'lib/lp/bugs/browser/bugtask.py'
382--- lib/lp/bugs/browser/bugtask.py 2012-06-03 23:11:40 +0000
383+++ lib/lp/bugs/browser/bugtask.py 2012-06-26 06:02:24 +0000
384@@ -706,13 +706,9 @@
385 def information_type(self):
386 use_private_flag = getFeatureFlag(
387 'disclosure.display_userdata_as_private.enabled')
388- info_type_enabled_flag = getFeatureFlag(
389- 'disclosure.show_information_type_in_ui.enabled')
390- value = None
391- if info_type_enabled_flag:
392- value = self.context.bug.information_type.title
393- if (use_private_flag and value == InformationType.USERDATA.title):
394- value = "Private"
395+ value = self.context.bug.information_type.title
396+ if (use_private_flag and value == InformationType.USERDATA.title):
397+ value = "Private"
398 return value
399
400 def initialize(self):
401
402=== modified file 'lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt'
403--- lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt 2012-04-10 14:01:17 +0000
404+++ lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt 2012-06-26 06:02:24 +0000
405@@ -384,11 +384,8 @@
406 <BLANKLINE>
407 This bug should be private.
408
409- >>> filebug_view.added_bug.private
410- True
411-
412- >>> filebug_view.added_bug.security_related
413- False
414+ >>> filebug_view.added_bug.information_type
415+ <DBItem InformationType.USERDATA, (4) User Data>
416
417 Since the bug was marked private before it was filed, only the bug
418 reporter has been subscribed to the bug and there should be no indirect
419@@ -688,9 +685,10 @@
420
421 The base class allows security bugs to be filed.
422
423+ >>> from lp.registry.enums import InformationType
424 >>> bug_data = dict(
425 ... title=u'Security bug', comment=u'Test description.',
426- ... security_related=True)
427+ ... information_type=InformationType.EMBARGOEDSECURITY)
428
429 >>> filebug_view = create_initialized_view(ubuntu_firefox, '+filebug')
430 >>> filebug_view.validate(bug_data) is None
431
432=== modified file 'lib/lp/bugs/browser/tests/test_bug_views.py'
433--- lib/lp/bugs/browser/tests/test_bug_views.py 2012-04-30 01:57:48 +0000
434+++ lib/lp/bugs/browser/tests/test_bug_views.py 2012-06-26 06:02:24 +0000
435@@ -6,7 +6,6 @@
436 __metaclass__ = type
437
438 from BeautifulSoup import BeautifulSoup
439-import simplejson
440 from soupmatchers import (
441 HTMLContains,
442 Tag,
443@@ -297,8 +296,7 @@
444
445 layer = DatabaseFunctionalLayer
446
447- def createInitializedSecrecyView(self, person=None, bug=None,
448- request=None, security_related=False):
449+ def createInitializedSecrecyView(self, person=None, bug=None):
450 """Create and return an initialized BugSecrecyView."""
451 if person is None:
452 person = self.factory.makePerson()
453@@ -307,12 +305,9 @@
454 with person_logged_in(person):
455 view = create_initialized_view(
456 bug.default_bugtask, name='+secrecy', form={
457- 'field.private': 'on',
458- 'field.security_related':
459- 'on' if security_related else 'off',
460+ 'field.information_type': 'USERDATA',
461 'field.actions.change': 'Change',
462- },
463- request=request)
464+ })
465 return view
466
467 def test_notification_shown_if_marking_private_and_not_subscribed(self):
468@@ -351,66 +346,15 @@
469 view = self.createInitializedSecrecyView(person, bug)
470 self.assertContentEqual([], view.request.response.notifications)
471
472- def test_secrecy_view_ajax_render(self):
473- # When the bug secrecy view is called from an ajax request, it should
474- # provide a json encoded dict when rendered. The dict contains bug
475- # subscription information resulting from the update to the bug
476- # privacy as well as information used to populate the updated
477- # subscribers list.
478- person = self.factory.makePerson()
479- bug = self.factory.makeBug(owner=person)
480- with person_logged_in(person):
481- bug.subscribe(person, person)
482-
483- extra = {'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest'}
484- request = LaunchpadTestRequest(
485- method='POST', form={
486- 'field.actions.change': 'Change',
487- 'field.private': 'on',
488- 'field.security_related': 'off'},
489- **extra)
490- view = self.createInitializedSecrecyView(person, bug, request)
491- result_data = simplejson.loads(view.render())
492-
493- cache_data = result_data['cache_data']
494- self.assertFalse(cache_data['other_subscription_notifications'])
495- subscription_data = cache_data['subscription']
496- self.assertEqual(
497- 'http://launchpad.dev/api/devel/bugs/%s' % bug.id,
498- subscription_data['bug_link'])
499- self.assertEqual(
500- 'http://launchpad.dev/api/devel/~%s' % person.name,
501- subscription_data['person_link'])
502- self.assertEqual(
503- 'Discussion', subscription_data['bug_notification_level'])
504-
505- [subscriber_data] = result_data['subscription_data']
506- subscriber = removeSecurityProxy(bug).default_bugtask.pillar.owner
507- self.assertEqual(
508- subscriber.name, subscriber_data['subscriber']['name'])
509- self.assertEqual('Discussion', subscriber_data['subscription_level'])
510-
511- def test_set_security_related(self):
512- # Test that the bug attribute 'security_related' can be updated
513- # using the view.
514- owner = self.factory.makePerson()
515- bug = self.factory.makeBug(owner=owner)
516- self.createInitializedSecrecyView(bug=bug, security_related=True)
517- with person_logged_in(owner):
518- self.assertTrue(bug.security_related)
519-
520 def test_set_information_type(self):
521 # Test that the bug's information_type can be updated using the
522 # view with the feature flag on.
523 bug = self.factory.makeBug()
524- feature_flag = {
525- 'disclosure.show_information_type_in_ui.enabled': 'on'}
526- with FeatureFixture(feature_flag):
527- with person_logged_in(bug.owner):
528- view = create_initialized_view(
529- bug.default_bugtask, name='+secrecy', form={
530- 'field.information_type': 'USERDATA',
531- 'field.actions.change': 'Change'})
532+ with person_logged_in(bug.owner):
533+ view = create_initialized_view(
534+ bug.default_bugtask, name='+secrecy', form={
535+ 'field.information_type': 'USERDATA',
536+ 'field.actions.change': 'Change'})
537 self.assertEqual([], view.errors)
538 self.assertEqual(InformationType.USERDATA, bug.information_type)
539
540@@ -418,7 +362,6 @@
541 # Test that the view creates the vocabulary correctly.
542 bug = self.factory.makeBug()
543 feature_flags = {
544- 'disclosure.show_information_type_in_ui.enabled': 'on',
545 'disclosure.proprietary_information_type.disabled': 'on',
546 'disclosure.display_userdata_as_private.enabled': 'on'}
547 with FeatureFixture(feature_flags):
548
549=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py'
550--- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-06-14 05:18:22 +0000
551+++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-06-26 06:02:24 +0000
552@@ -357,8 +357,6 @@
553 self.assertEqual(expected_guidelines, view.bug_reporting_guidelines)
554
555 def filebug_via_view(self, private_bugs=False, information_type=None):
556- feature_flag = {
557- 'disclosure.show_information_type_in_ui.enabled': 'on'}
558 form = {
559 'field.title': 'A bug',
560 'field.comment': 'A comment',
561@@ -369,13 +367,12 @@
562 product = self.factory.makeProduct(official_malone=True)
563 if private_bugs:
564 removeSecurityProxy(product).private_bugs = True
565- with FeatureFixture(feature_flag):
566- with person_logged_in(product.owner):
567- view = create_initialized_view(
568- product, '+filebug', form=form, principal=product.owner)
569- bug_url = view.request.response.getHeader('Location')
570- bug_number = bug_url.split('/')[-1]
571- return getUtility(IBugSet).getByNameOrID(bug_number)
572+ with person_logged_in(product.owner):
573+ view = create_initialized_view(
574+ product, '+filebug', form=form, principal=product.owner)
575+ bug_url = view.request.response.getHeader('Location')
576+ bug_number = bug_url.split('/')[-1]
577+ return getUtility(IBugSet).getByNameOrID(bug_number)
578
579 def test_filebug_default_information_type(self):
580 # If we don't specify the bug's information_type, it is PUBLIC for
581@@ -399,7 +396,6 @@
582 # The vocabulary for information_type when filing a bug is created
583 # correctly when 'User Data' is to be replaced by 'Private'.
584 feature_flags = {
585- 'disclosure.show_information_type_in_ui.enabled': 'on',
586 'disclosure.proprietary_information_type.disabled': 'on',
587 'disclosure.display_userdata_as_private.enabled': 'on'}
588 product = self.factory.makeProduct(official_malone=True)
589@@ -416,31 +412,25 @@
590 def test_filebug_information_type_vocabulary(self):
591 # The vocabulary for information_type when filing a bug is created
592 # correctly.
593- feature_flags = {
594- 'disclosure.show_information_type_in_ui.enabled': 'on'}
595 product = self.factory.makeProduct(official_malone=True)
596- with FeatureFixture(feature_flags):
597- with person_logged_in(product.owner):
598- view = create_initialized_view(
599- product, '+filebug', principal=product.owner)
600- html = view.render()
601- soup = BeautifulSoup(html)
602+ with person_logged_in(product.owner):
603+ view = create_initialized_view(
604+ product, '+filebug', principal=product.owner)
605+ html = view.render()
606+ soup = BeautifulSoup(html)
607 for info_type in InformationType:
608 self.assertIsNotNone(soup.find('label', text=info_type.title))
609
610 def test_filebug_information_type_vocabulary_private_projects(self):
611 # The vocabulary for information_type when filing a bug only has
612 # private info types for private bug projects.
613- feature_flags = {
614- 'disclosure.show_information_type_in_ui.enabled': 'on'}
615 product = self.factory.makeProduct(
616 official_malone=True, private_bugs=True)
617- with FeatureFixture(feature_flags):
618- with person_logged_in(product.owner):
619- view = create_initialized_view(
620- product, '+filebug', principal=product.owner)
621- html = view.render()
622- soup = BeautifulSoup(html)
623+ with person_logged_in(product.owner):
624+ view = create_initialized_view(
625+ product, '+filebug', principal=product.owner)
626+ html = view.render()
627+ soup = BeautifulSoup(html)
628 for info_type in PRIVATE_INFORMATION_TYPES:
629 self.assertIsNotNone(soup.find('label', text=info_type.title))
630 for info_type in PUBLIC_INFORMATION_TYPES:
631
632=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
633--- lib/lp/bugs/browser/tests/test_bugtask.py 2012-06-20 18:35:49 +0000
634+++ lib/lp/bugs/browser/tests/test_bugtask.py 2012-06-26 06:02:24 +0000
635@@ -299,11 +299,9 @@
636 information_type=InformationType.USERDATA)
637 login_person(owner)
638 bugtask = self.factory.makeBugTask(bug=bug)
639- features = {'disclosure.show_information_type_in_ui.enabled': True}
640- with FeatureFixture(features):
641- view = create_initialized_view(bugtask, name="+index")
642- self.assertEqual('User Data', view.information_type)
643- features['disclosure.display_userdata_as_private.enabled'] = True
644+ view = create_initialized_view(bugtask, name="+index")
645+ self.assertEqual('User Data', view.information_type)
646+ features = {'disclosure.display_userdata_as_private.enabled': True}
647 with FeatureFixture(features):
648 view = create_initialized_view(bugtask, name="+index")
649 self.assertEqual('Private', view.information_type)
650
651=== modified file 'lib/lp/bugs/javascript/bugtask_index.js'
652--- lib/lp/bugs/javascript/bugtask_index.js 2012-06-16 13:12:41 +0000
653+++ lib/lp/bugs/javascript/bugtask_index.js 2012-06-26 06:02:24 +0000
654@@ -110,51 +110,9 @@
655
656 privacy_link = Y.one('#privacy-link');
657
658- if (privacy_link && LP.cache.show_information_type_in_ui) {
659+ if (privacy_link) {
660 Y.lp.bugs.information_type_choice.setup_information_type_choice(
661 privacy_link, lp_client);
662- } else if (privacy_link) {
663- var privacy_link_url = privacy_link.getAttribute('href') +
664- '/++form++';
665- var privacy_div = Y.one('#privacy-text');
666- var privacy_html = privacy_link.get('innerHTML') + ' ';
667- privacy_div.set('innerHTML', privacy_html);
668- var privacy_text = Y.one('#privacy-text');
669- privacy_link = Y.Node.create(
670- '<a id="privacy-link" class="sprite edit action-icon"' +
671- ' title="[edit]">Edit</a>');
672- privacy_link.set('href', privacy_link_url);
673- privacy_text.appendChild(privacy_link);
674- privacy_spinner = Y.Node.create(
675- '<img src="/@@/spinner" style="display: none" />');
676- privacy_text.appendChild(privacy_spinner);
677-
678-
679- privacy_form_overlay = new Y.lazr.FormOverlay({
680- headerContent: '<h2>Change privacy settings</h2>',
681- form_submit_button: Y.Node.create(submit_button_html),
682- form_cancel_button: Y.Node.create(cancel_button_html),
683- centered: true,
684- form_submit_callback: update_privacy_settings,
685- visible: false
686- });
687- privacy_form_overlay.render('#privacy-form-container');
688- privacy_form_overlay.loadFormContentAndRender(privacy_link_url);
689- privacy_link.on('click', function(e) {
690- if (privacy_form_overlay) {
691- e.preventDefault();
692- privacy_form_overlay.show();
693- // XXX Abel Deuring 2009-04-23, bug 365462
694- // Y.one('#field.private') returns null.
695- // Seems that YUI does not like IDs containing a '.'
696- var field_private
697- = document.getElementById('field.private');
698- if (field_private !== null) {
699- field_private.focus();
700- }
701- }
702- });
703- privacy_link.addClass('js-action');
704 }
705 setup_add_attachment();
706 setup_link_branch_picker();
707
708=== modified file 'lib/lp/bugs/javascript/filebug.js'
709--- lib/lp/bugs/javascript/filebug.js 2012-06-12 22:17:49 +0000
710+++ lib/lp/bugs/javascript/filebug.js 2012-06-26 06:02:24 +0000
711@@ -28,11 +28,7 @@
712 if (Y.Lang.isValue(search_button )) {
713 search_button.set('value', 'Check again');
714 }
715- if (LP.cache.show_information_type_in_ui) {
716- setup_information_type();
717- } else {
718- setup_security_related();
719- }
720+ setup_information_type();
721 setupChoiceWidgets();
722 }
723 var filebug_privacy_text = "This report will be private. " +
724@@ -86,21 +82,6 @@
725 'information_type', LP.cache.information_type_data, true);
726 };
727
728-var setup_security_related = function() {
729- var sec = Y.one('[id="field.security_related"]');
730- if (!Y.Lang.isValue(sec)) {
731- return;
732- }
733- var notification_text = "This report will be private " +
734- "because it is a security " +
735- "vulnerability. You can " +
736- "disclose it later.";
737- sec.on('change', function() {
738- var checked = sec.get('checked');
739- update_privacy_banner(checked, notification_text);
740- });
741-};
742-
743 namespace.setup_filebug = setup_filebug;
744
745 }, "0.1", {"requires": [
746
747=== modified file 'lib/lp/bugs/javascript/information_type_choice.js'
748--- lib/lp/bugs/javascript/information_type_choice.js 2012-06-13 01:16:09 +0000
749+++ lib/lp/bugs/javascript/information_type_choice.js 2012-06-26 06:02:24 +0000
750@@ -73,17 +73,12 @@
751 };
752
753 namespace.get_information_type_banner_text = function(value) {
754- var fallback_text = "The information on this page is private.";
755 var text_template = "This page contains {info_type} information.";
756
757 if (value === "User Data" && LP.cache.show_userdata_as_private) {
758 value = "Private";
759 }
760- if (LP.cache.show_information_type_in_ui) {
761- return Y.Lang.substitute(text_template, {'info_type': value});
762- } else {
763- return fallback_text;
764- }
765+ return Y.Lang.substitute(text_template, {'info_type': value});
766 };
767
768 namespace.information_type_save_success = function(widget, value) {
769
770=== modified file 'lib/lp/bugs/javascript/tests/test_filebug.js'
771--- lib/lp/bugs/javascript/tests/test_filebug.js 2012-06-15 01:13:39 +0000
772+++ lib/lp/bugs/javascript/tests/test_filebug.js 2012-06-26 06:02:24 +0000
773@@ -76,7 +76,6 @@
774 // Selecting a private info type using the legacy radio buttons
775 // turns on the privacy banner.
776 test_legacy_select_private_info_type: function () {
777- window.LP.cache.show_information_type_in_ui = true;
778 Y.lp.bugs.filebug.setup_filebug(true);
779 var banner_hidden = Y.one('.yui3-privacybanner-hidden');
780 Y.Assert.isNotNull(banner_hidden);
781@@ -92,7 +91,6 @@
782 // Selecting a public info type using the legacy radio buttons
783 // turns off the privacy banner.
784 test_legacy_select_public_info_type: function () {
785- window.LP.cache.show_information_type_in_ui = true;
786 window.LP.cache.bug_private_by_default = true;
787 Y.lp.bugs.filebug.setup_filebug(true);
788 Y.one('[id=field.information_type.2]').simulate('click');
789@@ -209,7 +207,6 @@
790 // Selecting a private info type using the popup choice widget
791 // turns on the privacy banner.
792 test_select_private_info_type: function () {
793- window.LP.cache.show_information_type_in_ui = true;
794 Y.lp.bugs.filebug.setup_filebug(true);
795 var banner_hidden = Y.one('.yui3-privacybanner-hidden');
796 Y.Assert.isNotNull(banner_hidden);
797@@ -227,7 +224,6 @@
798 },
799
800 test_select_private_info_type_with_private_flag: function () {
801- window.LP.cache.show_information_type_in_ui = true;
802 window.LP.cache.show_userdata_as_private = true;
803 Y.lp.bugs.filebug.setup_filebug(true);
804 var banner_hidden = Y.one('.yui3-privacybanner-hidden');
805@@ -247,7 +243,6 @@
806 // Selecting a public info type using the popup choice widget
807 // turns off the privacy banner.
808 test_select_public_info_type: function () {
809- window.LP.cache.show_information_type_in_ui = true;
810 window.LP.cache.bug_private_by_default = true;
811 Y.lp.bugs.filebug.setup_filebug(true);
812 var information_type_popup = Y.one('#information_type-content a');
813
814=== modified file 'lib/lp/bugs/javascript/tests/test_information_type_choice.js'
815--- lib/lp/bugs/javascript/tests/test_information_type_choice.js 2012-06-13 01:16:09 +0000
816+++ lib/lp/bugs/javascript/tests/test_information_type_choice.js 2012-06-26 06:02:24 +0000
817@@ -22,7 +22,6 @@
818 information_type: 'Public',
819 self_link: '/bug/1'
820 },
821- show_information_type_in_ui: true,
822 private_types: ['Private', 'User Data'],
823 information_types: [
824 {'value': 'Public', 'name': 'Public',
825
826=== modified file 'lib/lp/bugs/stories/bug-also-affects/xx-also-affects-upstream-private-bug.txt'
827--- lib/lp/bugs/stories/bug-also-affects/xx-also-affects-upstream-private-bug.txt 2012-04-04 05:46:26 +0000
828+++ lib/lp/bugs/stories/bug-also-affects/xx-also-affects-upstream-private-bug.txt 2012-06-26 06:02:24 +0000
829@@ -12,8 +12,7 @@
830
831 >>> admin_browser.open(
832 ... 'http://bugs.launchpad.dev/jokosher/+bug/12/+secrecy')
833- >>> admin_browser.getControl(
834- ... 'This bug report should be private').selected = True
835+ >>> admin_browser.getControl('User Data').selected = True
836 >>> admin_browser.getControl('Change').click()
837
838 >>> admin_browser.open(
839@@ -22,10 +21,6 @@
840 >>> admin_browser.getControl('Project:').value = 'firefox'
841 >>> admin_browser.getControl('Continue').click()
842
843- >>> print admin_browser.contents
844- <!DOCTYPE...
845- ...This is a private bug...Foo Bar...won&rsquo;t be notified...
846-
847 >>> admin_browser.getLink('additional contacts').click()
848 >>> 'Page not found' not in admin_browser.contents
849 True
850
851=== modified file 'lib/lp/bugs/stories/bug-privacy/xx-bug-privacy.txt'
852--- lib/lp/bugs/stories/bug-privacy/xx-bug-privacy.txt 2012-04-19 20:57:17 +0000
853+++ lib/lp/bugs/stories/bug-privacy/xx-bug-privacy.txt 2012-06-26 06:02:24 +0000
854@@ -8,11 +8,7 @@
855 Foo Bar is not Cc'd on this bug, but is able to set the bug private
856 anyway, because he is an admin.
857
858- >>> browser.open(
859- ... "http://bugs.launchpad.dev/debian/+source/mozilla-firefox/"
860- ... "+bug/2/+secrecy")
861- >>> browser.getControl("This bug report should be private").selected = (
862- ... True)
863+ >>> browser.getControl("User Data").selected = True
864 >>> browser.getControl("Change").click()
865 >>> print browser.url
866 http://bugs.launchpad.dev/debian/+source/mozilla-firefox/+bug/2
867@@ -22,7 +18,7 @@
868 >>> browser.open(
869 ... "http://bugs.launchpad.dev/debian/+source/mozilla-firefox/"
870 ... "+bug/2/+secrecy")
871- >>> browser.getControl("This bug report should be private").selected
872+ >>> browser.getControl("User Data").selected
873 True
874
875 Foo Bar files a security (private) bug on Ubuntu Linux. He gets
876@@ -38,16 +34,10 @@
877 ... "a private bug")
878 >>> browser.getControl('Continue').click()
879
880- >>> print browser.contents
881- <!DOCTYPE...
882- ...The maintainer of...Ubuntu...Ubuntu Team...will be notified...
883- ...
884-
885 >>> browser.getControl(name="packagename_option").value = ["choose"]
886 >>> browser.getControl(name="field.packagename").value = "evolution"
887 >>> browser.getControl(name="field.comment").value = "secret info"
888- >>> browser.getControl(
889- ... "This bug is a security vulnerability").selected = True
890+ >>> browser.getControl("Embargoed Security").selected = True
891 >>> browser.getControl("Submit Bug Report").click()
892
893 >>> bug_id = browser.url.split("/")[-1]
894@@ -95,16 +85,10 @@
895 ... "a private bug")
896 >>> browser.getControl('Continue').click()
897
898- >>> print browser.contents
899- <!DOCTYPE...
900- ...The security contact for...Ubuntu...Sample Person...will be notified...
901- ...
902-
903 >>> browser.getControl(name="packagename_option").value = ["choose"]
904 >>> browser.getControl(name="field.packagename").value = "evolution"
905 >>> browser.getControl(name="field.comment").value = "secret info"
906- >>> browser.getControl(
907- ... "This bug is a security vulnerability").selected = True
908+ >>> browser.getControl("Embargoed Security").selected = True
909 >>> browser.getControl("Submit Bug Report").click()
910
911 >>> other_bug_id = browser.url.split("/")[-1]
912
913=== modified file 'lib/lp/bugs/stories/bug-privacy/xx-presenting-private-bugs.txt'
914--- lib/lp/bugs/stories/bug-privacy/xx-presenting-private-bugs.txt 2011-04-20 14:56:23 +0000
915+++ lib/lp/bugs/stories/bug-privacy/xx-presenting-private-bugs.txt 2012-06-26 06:02:24 +0000
916@@ -6,26 +6,25 @@
917 >>> browser = setupBrowser(auth="Basic foo.bar@canonical.com:test")
918 >>> browser.open("http://launchpad.dev/bugs/4")
919 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
920- This report is public
921+ This report contains Public information...
922
923 But when marked private, it gains the standard Launchpad presentation
924 for private things.
925
926 >>> browser.open("http://bugs.launchpad.dev/firefox/+bug/4/+secrecy")
927- >>> browser.getControl(
928- ... "This bug report should be private").selected = True
929+ >>> browser.getControl("User Data").selected = True
930 >>> browser.getControl("Change").click()
931 >>> print browser.url
932 http://bugs.launchpad.dev/firefox/+bug/4
933 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
934- This report is private
935+ This report contains User Data information...
936
937 Bugs created before we started recording the date and time and who
938 marked the bug private show only a simple message:
939
940 >>> browser.open("http://launchpad.dev/bugs/14")
941 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
942- This report is private...
943+ This report contains Embargoed Security information...
944
945 But newer bugs that are filed private at creation time (like security
946 bugs or where the product requests that bugs are private by default)
947@@ -37,14 +36,13 @@
948 >>> browser.getControl('Continue').click()
949
950 >>> browser.getControl("Further information").value = "foo"
951- >>> browser.getControl(
952- ... "This bug is a security vulnerability").selected = True
953+ >>> browser.getControl("Embargoed Security").selected = True
954 >>> browser.getControl("Submit Bug Report").click()
955
956 >>> print browser.url
957 http://bugs.launchpad.dev/firefox/+bug/...
958 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
959- This report is private...
960+ This report contains Embargoed Security information...
961
962 XXX 20080708 mpt: Bug 246671 again.
963
964
965=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-activity.txt'
966--- lib/lp/bugs/stories/bugs/xx-bug-activity.txt 2012-05-08 06:02:05 +0000
967+++ lib/lp/bugs/stories/bugs/xx-bug-activity.txt 2012-06-26 06:02:24 +0000
968@@ -101,8 +101,7 @@
969
970 >>> admin_browser.open(
971 ... 'http://bugs.launchpad.dev/redfish/+bug/15/+secrecy')
972- >>> admin_browser.getControl(
973- ... "This bug report should be private").selected = True
974+ >>> admin_browser.getControl("User Data").selected = True
975 >>> admin_browser.getControl("Change").click()
976
977 >>> admin_browser.open('http://launchpad.dev/bugs/15')
978@@ -116,12 +115,6 @@
979 public => private
980 --------
981
982- >>> admin_browser.open(
983- ... 'http://bugs.launchpad.dev/redfish/+bug/15/+secrecy')
984- >>> admin_browser.getControl(
985- ... "This bug report should be private").selected = False
986- >>> admin_browser.getControl("Change").click()
987-
988 Changes to a bug's security_related field will be displayed as
989 'security vulnerability' changes, with values of 'yes' or 'no'. Note
990 that changes are grouped together if they occur at similar times, but
991@@ -129,8 +122,7 @@
992
993 >>> admin_browser.open(
994 ... 'http://bugs.launchpad.dev/redfish/+bug/15/+secrecy')
995- >>> admin_browser.getControl(
996- ... "This bug is a security vulnerability").selected = True
997+ >>> admin_browser.getControl("Embargoed Security").selected = True
998 >>> admin_browser.getControl("Change").click()
999
1000 >>> admin_browser.open('http://launchpad.dev/bugs/15')
1001@@ -322,13 +314,12 @@
1002 Changes to information_type are shown when the feature flag is set.
1003
1004 >>> from lp.services.features.testing import FeatureFixture
1005- >>> feature_flags = {
1006+ >>> feature_flag = {
1007 ... 'disclosure.information_type_notifications.enabled': 'on'}
1008- >>> with FeatureFixture(feature_flags):
1009+ >>> with FeatureFixture(feature_flag):
1010 ... admin_browser.open(
1011 ... "http://bugs.launchpad.dev/evolution/+bug/7/+secrecy")
1012- ... admin_browser.getControl(
1013- ... "This bug report should be private").selected = True
1014+ ... admin_browser.getControl("User Data").selected = True
1015 ... admin_browser.getControl('Change').click()
1016 ... admin_browser.open("http://bugs.launchpad.dev/evolution/+bug/7")
1017 ... print_comments(admin_browser.contents)
1018@@ -338,11 +329,7 @@
1019 Public => User Data
1020 --------
1021
1022- >>> from lp.services.features.testing import FeatureFixture
1023- >>> feature_flags = {
1024- ... 'disclosure.show_information_type_in_ui.enabled': 'on',
1025- ... 'disclosure.information_type_notifications.enabled': 'on'}
1026- >>> with FeatureFixture(feature_flags):
1027+ >>> with FeatureFixture(feature_flag):
1028 ... admin_browser.open(
1029 ... "http://bugs.launchpad.dev/jokosher/+bug/14/+secrecy")
1030 ... admin_browser.getControl("User Data").selected = True
1031
1032=== modified file 'lib/lp/bugs/stories/bugs/xx-duplicate-of-private-bug.txt'
1033--- lib/lp/bugs/stories/bugs/xx-duplicate-of-private-bug.txt 2009-06-12 16:36:02 +0000
1034+++ lib/lp/bugs/stories/bugs/xx-duplicate-of-private-bug.txt 2012-06-26 06:02:24 +0000
1035@@ -9,8 +9,7 @@
1036 >>> admin_browser.open(
1037 ... 'http://bugs.launchpad.dev/'
1038 ... 'debian/+source/mozilla-firefox/+bug/8/+secrecy')
1039- >>> admin_browser.getControl(
1040- ... 'This bug report should be private').selected = True
1041+ >>> admin_browser.getControl('User Data').selected = True
1042 >>> admin_browser.getControl('Change').click()
1043 >>> print admin_browser.url
1044 http://bugs.launchpad.dev/debian/+source/mozilla-firefox/+bug/8
1045@@ -19,7 +18,7 @@
1046 Bug #8 ...Printing doesn't work...
1047
1048 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'privacy'))
1049- This report is private
1050+ This report contains User Data information...
1051
1052 Next we mark another bug as a duplicate of the private bug:
1053
1054
1055=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt'
1056--- lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt 2012-04-04 05:46:26 +0000
1057+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt 2012-06-26 06:02:24 +0000
1058@@ -55,11 +55,8 @@
1059 Mark bug 1 as private:
1060
1061 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
1062- >>> browser.open('http://bugs.launchpad.dev/firefox/+bug/1')
1063- >>> browser.getLink('This report is public').click()
1064- >>> browser.url
1065- 'http://bugs.launchpad.dev/firefox/+bug/1/+secrecy'
1066- >>> browser.getControl('This bug report should be private').selected = True
1067+ >>> browser.open('http://bugs.launchpad.dev/firefox/+bug/1/+secrecy')
1068+ >>> browser.getControl('User Data').selected = True
1069 >>> browser.getControl('Change').click()
1070 >>> browser.url
1071 'http://bugs.launchpad.dev/firefox/+bug/1'
1072@@ -103,11 +100,8 @@
1073
1074 Set the bug back to public:
1075
1076- >>> browser.open('http://bugs.launchpad.dev/firefox/+bug/1')
1077- >>> browser.getLink('This report is private').click()
1078- >>> browser.url
1079- 'http://bugs.launchpad.dev/firefox/+bug/1/+secrecy'
1080- >>> browser.getControl('This bug report should be private').selected = False
1081+ >>> browser.open('http://bugs.launchpad.dev/firefox/+bug/1/+secrecy')
1082+ >>> browser.getControl('Public').selected = True
1083 >>> browser.getControl('Change').click()
1084 >>> browser.url
1085 'http://bugs.launchpad.dev/firefox/+bug/1'
1086
1087=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt'
1088--- lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2012-02-22 22:17:46 +0000
1089+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2012-06-26 06:02:24 +0000
1090@@ -606,10 +606,9 @@
1091 details are displayed. For example, when a bug watch is associated with
1092 a private bug:
1093
1094- >>> admin_browser.open('http://launchpad.dev/bugs/3')
1095- >>> admin_browser.getLink('This report is public').click()
1096- >>> admin_browser.getControl(
1097- ... 'This bug report should be private').selected = True
1098+ >>> admin_browser.open(
1099+ ... 'http://launchpad.dev/debian/+source/mozilla-firefox/+bug/3/+secrecy')
1100+ >>> admin_browser.getControl('User Data').selected = True
1101 >>> admin_browser.getControl('Change').click()
1102
1103 >>> anon_browser.open(
1104
1105=== modified file 'lib/lp/bugs/stories/initial-bug-contacts/xx-initial-bug-contacts.txt'
1106--- lib/lp/bugs/stories/initial-bug-contacts/xx-initial-bug-contacts.txt 2012-01-06 11:08:30 +0000
1107+++ lib/lp/bugs/stories/initial-bug-contacts/xx-initial-bug-contacts.txt 2012-06-26 06:02:24 +0000
1108@@ -149,8 +149,7 @@
1109 >>> browser.getControl('Continue').click()
1110
1111 >>> browser.getControl(name="field.comment").value = "a PRIVATE bug"
1112- >>> browser.getControl(
1113- ... "This bug is a security vulnerability").selected = True
1114+ >>> browser.getControl("Embargoed Security").selected = True
1115 >>> browser.getControl("Submit Bug Report").click()
1116
1117 >>> other_bug_id = browser.url.split("/")[-1]
1118@@ -223,8 +222,7 @@
1119 >>> browser.getControl('Continue').click()
1120
1121 >>> browser.getControl(name="field.comment").value = "top sekrit"
1122- >>> browser.getControl(
1123- ... "This bug is a security vulnerability").selected = True
1124+ >>> browser.getControl("Embargoed Security").selected = True
1125 >>> browser.getControl("Submit Bug Report").click()
1126
1127 >>> other_bug_id = browser.url.split("/")[-1]
1128
1129=== modified file 'lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt'
1130--- lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt 2011-12-24 15:18:32 +0000
1131+++ lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt 2012-06-26 06:02:24 +0000
1132@@ -7,18 +7,11 @@
1133 ... "this is a newly created private bug")
1134 >>> browser.getControl("Continue").click()
1135
1136- >>> print browser.contents
1137- <!DOCTYPE...
1138- ...The maintainer of...Mozilla Firefox...Sample Person...will be notified...
1139- ...
1140-
1141 >>> browser.getControl(name="field.title").value = (
1142 ... "this is a newly created private bug")
1143 >>> browser.getControl(name="field.comment").value = (
1144 ... "very secret info here")
1145- >>> browser.getControl(
1146- ... "This bug is a security vulnerability").selected = True
1147-
1148+ >>> browser.getControl("Embargoed Security").selected = True
1149 >>> browser.getControl("Submit Bug Report").click()
1150
1151 >>> bug_id = browser.url.split("/")[-1]
1152@@ -78,16 +71,9 @@
1153 ... "this is a newly created private bug")
1154 >>> browser.getControl("Continue").click()
1155
1156- >>> print browser.contents
1157- <!DOCTYPE...
1158- ...The security contact for...Mozilla Firefox...Mark Shuttleworth...will be notified...
1159- ...
1160-
1161 >>> browser.getControl(name="field.comment").value = (
1162 ... "very secret info here")
1163- >>> browser.getControl(
1164- ... "This bug is a security vulnerability").selected = True
1165-
1166+ >>> browser.getControl("Embargoed Security").selected = True
1167 >>> browser.getControl("Submit Bug Report").click()
1168
1169 >>> other_bug_id = browser.url.split("/")[-1]
1170
1171=== modified file 'lib/lp/bugs/templates/bug-portlet-privacy.pt'
1172--- lib/lp/bugs/templates/bug-portlet-privacy.pt 2012-06-15 16:23:50 +0000
1173+++ lib/lp/bugs/templates/bug-portlet-privacy.pt 2012-06-26 06:02:24 +0000
1174@@ -9,7 +9,6 @@
1175 tal:define="link context/menu:context/visibility"
1176 >
1177 <div id="privacy-text">
1178- <tal:information_type tal:condition="view/show_information_type_in_ui">
1179 <span id="information-type-summary"
1180 tal:attributes="class view/information_type_css;">This report
1181 contains
1182@@ -20,26 +19,5 @@
1183 >Edit</a>
1184 <div id="information-type-description" style="padding-top: 5px"
1185 tal:content="view/information_type_description"></div>
1186- </tal:information_type>
1187- <tal:privacy tal:condition="not:view/show_information_type_in_ui">
1188- <div tal:condition="not:context/private" id="privacy-text">
1189- <a class="sprite edit" id="privacy-link"
1190- tal:attributes="href link/path; title link/text"
1191- tal:condition="link/enabled">This report is public</a>
1192- <tal:unchangeable condition="not:link/enabled">
1193- This report is public
1194- </tal:unchangeable>
1195- </div>
1196- <div tal:condition="context/private" id="privacy-text">
1197- <a class="sprite edit" id="privacy-link"
1198- tal:attributes="href link/path; title link/text"
1199- tal:condition="link/enabled">This report is <strong>private</strong></a>
1200- <tal:unchangeable condition="not:link/enabled">
1201- This report is private
1202- </tal:unchangeable>
1203- </div>
1204- <div class="sprite security" id="security-message"
1205- tal:condition="context/security_related">Security vulnerability</div>
1206- </tal:privacy>
1207 </div>
1208 </div>
1209
1210=== modified file 'lib/lp/bugs/templates/bugtarget-filebug-guidelines.pt'
1211--- lib/lp/bugs/templates/bugtarget-filebug-guidelines.pt 2012-04-19 06:24:16 +0000
1212+++ lib/lp/bugs/templates/bugtarget-filebug-guidelines.pt 2012-06-26 06:02:24 +0000
1213@@ -11,7 +11,6 @@
1214 </tr>
1215
1216 <tr tal:define="security_context view/getMainContext">
1217- <tal:information_type tal:condition="view/show_information_type_in_ui">
1218 <td colspan="2" width="100%"
1219 tal:define="widget nocall: view/widgets/information_type|nothing"
1220 tal:condition="widget">
1221@@ -20,44 +19,6 @@
1222 </label>
1223 <input tal:replace="structure widget" />
1224 </td>
1225- </tal:information_type>
1226- <tal:security_related tal:condition="not: view/show_information_type_in_ui">
1227- <td colspan="2" width="100%"
1228- tal:define="widget nocall: view/widgets/security_related|nothing"
1229- tal:condition="widget">
1230- <table>
1231- <tbody>
1232- <tr>
1233- <td>
1234- <input type="checkbox" tal:replace="structure widget" />
1235- </td>
1236- <td>
1237- <label tal:attributes="for widget/name">
1238- This bug is a security vulnerability
1239- </label>
1240- <div tal:define="security_contact security_context/security_contact|nothing">
1241- <tal:security-contact tal:condition="security_contact">
1242- The security contact for
1243- <tal:security-context content="security_context/displayname" />,
1244- <a tal:replace="structure security_contact/fmt:link" />,
1245- will be notified.
1246- </tal:security-contact>
1247- <tal:maintainer condition="not:security_contact"
1248- define="maintainer security_context/owner">
1249- The maintainer of
1250- <tal:security-context content="security_context/displayname">
1251- Mozilla Firefox</tal:security-context>,
1252- <a tal:replace="structure maintainer/fmt:link">
1253- Sample Person</a>,
1254- will be notified.
1255- </tal:maintainer>
1256- </div>
1257- </td>
1258- </tr>
1259- </tbody>
1260- </table>
1261- </td>
1262- </tal:security_related>
1263 </tr>
1264 </tbody></table></td></tr>
1265 </tal:root>
1266
1267=== modified file 'lib/lp/code/browser/branch.py'
1268--- lib/lp/code/browser/branch.py 2012-06-01 05:25:56 +0000
1269+++ lib/lp/code/browser/branch.py 2012-06-26 06:02:24 +0000
1270@@ -132,7 +132,6 @@
1271 from lp.services import searchbuilder
1272 from lp.services.config import config
1273 from lp.services.database.constants import UTC_NOW
1274-from lp.services.features import getFeatureFlag
1275 from lp.services.feeds.browser import (
1276 BranchFeedLink,
1277 FeedsMixin,
1278@@ -444,11 +443,6 @@
1279
1280 label = page_title
1281
1282- @property
1283- def show_information_type_in_ui(self):
1284- return bool(getFeatureFlag(
1285- 'disclosure.show_information_type_in_branch_ui.enabled'))
1286-
1287 def initialize(self):
1288 super(BranchView, self).initialize()
1289 self.branch = self.context
1290@@ -745,8 +739,6 @@
1291 information_type = copy_field(
1292 IBranch['information_type'], readonly=False,
1293 vocabulary=InformationTypeVocabulary())
1294- explicitly_private = copy_field(
1295- IBranch['explicitly_private'], readonly=False)
1296 reviewer = copy_field(IBranch['reviewer'], required=True)
1297 owner = copy_field(IBranch['owner'], readonly=False)
1298 return BranchEditSchema
1299@@ -789,20 +781,6 @@
1300 information_type = data.pop('information_type')
1301 self.context.transitionToInformationType(
1302 information_type, self.user)
1303- if 'explicitly_private' in data:
1304- private = data.pop('explicitly_private')
1305- if (private != self.context.private
1306- and self.context.private == self.context.explicitly_private):
1307- # We only want to show notifications if it actually changed.
1308- self.context.setPrivate(private, self.user)
1309- changed = True
1310- if private:
1311- self.request.response.addNotification(
1312- "The branch is now private, and only visible to the "
1313- "owner and to subscribers.")
1314- else:
1315- self.request.response.addNotification(
1316- "The branch is now publicly accessible.")
1317 if 'reviewer' in data:
1318 reviewer = data.pop('reviewer')
1319 if reviewer != self.context.code_reviewer:
1320@@ -1039,18 +1017,10 @@
1321 """The main branch for editing the branch attributes."""
1322
1323 @property
1324- def show_information_type_in_ui(self):
1325- return bool(getFeatureFlag(
1326- 'disclosure.show_information_type_in_branch_ui.enabled'))
1327-
1328- @property
1329 def field_names(self):
1330- fields = [
1331- 'owner', 'name', 'explicitly_private', 'url', 'description',
1332+ return [
1333+ 'owner', 'name', 'information_type', 'url', 'description',
1334 'lifecycle_status']
1335- if self.show_information_type_in_ui:
1336- fields[2] = 'information_type'
1337- return fields
1338
1339 custom_widget('lifecycle_status', LaunchpadRadioWidgetWithDescription)
1340 custom_widget('information_type', LaunchpadRadioWidgetWithDescription)
1341@@ -1095,8 +1065,7 @@
1342 user_has_special_branch_access(self.user))
1343
1344 if not show_private_field:
1345- self.form_fields = self.form_fields.omit(
1346- 'explicitly_private', 'information_type')
1347+ self.form_fields = self.form_fields.omit('information_type')
1348
1349 # If the user can administer branches, then they should be able to
1350 # assign the ownership of the branch to any valid person or team.
1351
1352=== modified file 'lib/lp/code/browser/tests/test_branch.py'
1353--- lib/lp/code/browser/tests/test_branch.py 2012-06-08 06:01:50 +0000
1354+++ lib/lp/code/browser/tests/test_branch.py 2012-06-26 06:02:24 +0000
1355@@ -908,15 +908,12 @@
1356 # the feature flag is enabled.
1357 person = self.factory.makePerson()
1358 branch = self.factory.makeProductBranch(owner=person)
1359- feature_flag = {
1360- 'disclosure.show_information_type_in_branch_ui.enabled': 'on'}
1361 admins = getUtility(ILaunchpadCelebrities).admin
1362 admin = admins.teamowner
1363- with FeatureFixture(feature_flag):
1364- browser = self.getUserBrowser(
1365- canonical_url(branch) + '/+edit', user=admin)
1366- browser.getControl("Embargoed Security").click()
1367- browser.getControl("Change Branch").click()
1368+ browser = self.getUserBrowser(
1369+ canonical_url(branch) + '/+edit', user=admin)
1370+ browser.getControl("Embargoed Security").click()
1371+ browser.getControl("Change Branch").click()
1372 with person_logged_in(person):
1373 self.assertEqual(
1374 InformationType.EMBARGOEDSECURITY, branch.information_type)
1375@@ -926,12 +923,11 @@
1376 # has been correctly created.
1377 person = self.factory.makePerson()
1378 branch = self.factory.makeProductBranch(owner=person)
1379- feature_flags = {
1380- 'disclosure.show_information_type_in_branch_ui.enabled': 'on',
1381+ feature_flag = {
1382 'disclosure.proprietary_information_type.disabled': 'on'}
1383 admins = getUtility(ILaunchpadCelebrities).admin
1384 admin = admins.teamowner
1385- with FeatureFixture(feature_flags):
1386+ with FeatureFixture(feature_flag):
1387 browser = self.getUserBrowser(
1388 canonical_url(branch) + '/+edit', user=admin)
1389 self.assertRaises(LookupError, browser.getControl, "Proprietary")
1390@@ -978,17 +974,13 @@
1391 layer = LaunchpadFunctionalLayer
1392
1393 def test_information_type_in_ui(self):
1394- # With the show_information_type_in_branch_ui feature flag on, the
1395- # privacy portlet shows the information_type.
1396+ # The privacy portlet shows the information_type.
1397 owner = self.factory.makePerson()
1398 branch = self.factory.makeBranch(
1399 owner=owner, information_type=InformationType.USERDATA)
1400- feature_flag = {
1401- 'disclosure.show_information_type_in_branch_ui.enabled': 'on'}
1402- with FeatureFixture(feature_flag):
1403- with person_logged_in(owner):
1404- view = create_initialized_view(branch, '+portlet-privacy')
1405- soup = BeautifulSoup(view.render())
1406+ with person_logged_in(owner):
1407+ view = create_initialized_view(branch, '+portlet-privacy')
1408+ soup = BeautifulSoup(view.render())
1409 information_type = soup.find('strong')
1410 description = soup.find('div', id='information-type-description')
1411 self.assertEqual('User Data', information_type.renderContents())
1412@@ -998,16 +990,14 @@
1413 description.renderContents())
1414
1415 def test_information_type_in_ui_with_display_as_private(self):
1416- # With both show_information_type_in_branch_ui and
1417- # display_userdata_as_private, the information_type is shown with
1418- # User Data masked as Private.
1419+ # With display_userdata_as_private, the information_type is shown
1420+ # with User Data masked as Private.
1421 owner = self.factory.makePerson()
1422 branch = self.factory.makeBranch(
1423 owner=owner, information_type=InformationType.USERDATA)
1424- feature_flags = {
1425- 'disclosure.show_information_type_in_branch_ui.enabled': 'on',
1426+ feature_flag = {
1427 'disclosure.display_userdata_as_private.enabled': 'on'}
1428- with FeatureFixture(feature_flags):
1429+ with FeatureFixture(feature_flag):
1430 with person_logged_in(owner):
1431 view = create_initialized_view(branch, '+portlet-privacy')
1432 soup = BeautifulSoup(view.render())
1433
1434=== modified file 'lib/lp/code/stories/branches/xx-branch-edit-privacy.txt'
1435--- lib/lp/code/stories/branches/xx-branch-edit-privacy.txt 2012-05-25 01:48:31 +0000
1436+++ lib/lp/code/stories/branches/xx-branch-edit-privacy.txt 2012-06-26 06:02:24 +0000
1437@@ -39,13 +39,13 @@
1438
1439 >>> admin_browser.open('http://code.launchpad.dev/~eric/fooix/trunk')
1440 >>> admin_browser.getLink('Change branch details').click()
1441- >>> admin_browser.getControl('Keep branch confidential').click()
1442+ >>> admin_browser.getControl('User Data').click()
1443 >>> admin_browser.getControl('Change Branch').click()
1444
1445 The branch is now private, so it assumes the standard private presentation.
1446
1447 >>> print_tag_with_id(admin_browser.contents, 'privacy')
1448- This branch is private
1449+ This branch contains User Data information...
1450
1451
1452 Private branches allowed
1453@@ -68,33 +68,23 @@
1454 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')
1455 >>> browser.open('http://code.launchpad.dev/~name12/firefox/main')
1456 >>> browser.getLink('Change branch details').click()
1457- >>> browser.getControl('Keep branch confidential').selected = True
1458+ >>> browser.getControl('User Data').selected = True
1459 >>> browser.getControl('Change Branch').click()
1460
1461-A notification is added to say the branch is now private.
1462-
1463- >>> print_feedback_messages(browser.contents)
1464- The branch is now private, and only visible to the owner and to subscribers.
1465-
1466 Since the branch is now private, it will have the standard Launchpad
1467 presentation for private things.
1468
1469 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
1470- This branch is private
1471+ This branch contains User Data information...
1472
1473 If Sample Person changes the branch from private back to public, the page
1474 reverts to its normal presentation.
1475
1476 >>> browser.getLink('Change branch details').click()
1477- >>> browser.getControl('Keep branch confidential').selected = False
1478+ >>> browser.getControl('Public').selected = True
1479 >>> browser.getControl('Change Branch').click()
1480 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
1481- This branch is public
1482-
1483-A notification is added to say the branch is now public.
1484-
1485- >>> print_feedback_messages(browser.contents)
1486- The branch is now publicly accessible.
1487+ This branch contains Public information...
1488
1489
1490 Private Only branches
1491@@ -113,19 +103,19 @@
1492 Mark the public branch private.
1493
1494 >>> browser.getLink('Change branch details').click()
1495- >>> browser.getControl('Keep branch confidential').selected = True
1496+ >>> browser.getControl('User Data').selected = True
1497 >>> browser.getControl('Change Branch').click()
1498
1499 The branch is now private, so it assumes the standard private presentation.
1500
1501 >>> print extract_text(find_tag_by_id(browser.contents, 'privacy'))
1502- This branch is private
1503+ This branch contains User Data information...
1504
1505 However when the user now looks to edit the branch details, there
1506 is no option to mark the branch as public.
1507
1508 >>> browser.getLink('Change branch details').click()
1509- >>> browser.getControl('Keep branch confidential')
1510+ >>> browser.getControl('Public')
1511 Traceback (most recent call last):
1512 ...
1513- LookupError: label 'Keep branch confidential'
1514+ LookupError: label 'Public'
1515
1516=== modified file 'lib/lp/code/stories/branches/xx-branch-index.txt'
1517--- lib/lp/code/stories/branches/xx-branch-index.txt 2012-05-24 04:21:10 +0000
1518+++ lib/lp/code/stories/branches/xx-branch-index.txt 2012-06-26 06:02:24 +0000
1519@@ -407,7 +407,7 @@
1520 >>> browser.open(url)
1521 >>> content = find_tag_by_id(browser.contents, 'document')
1522 >>> print extract_text(find_tag_by_id(content, 'privacy'))
1523- This branch is public
1524+ This branch contains Public information...
1525
1526 Navigation Context
1527 ..................
1528
1529=== modified file 'lib/lp/code/stories/branches/xx-branch-listings.txt'
1530--- lib/lp/code/stories/branches/xx-branch-listings.txt 2011-06-27 15:14:46 +0000
1531+++ lib/lp/code/stories/branches/xx-branch-listings.txt 2012-06-26 06:02:24 +0000
1532@@ -229,9 +229,8 @@
1533 If the bug is not visible to the user that is looking at the page, then the
1534 badge is not shown.
1535
1536- >>> browser.open('http://bugs.launchpad.dev/firefox/+bug/4')
1537- >>> browser.getLink('This report is public').click()
1538- >>> browser.getControl('This bug report should be private').click()
1539+ >>> browser.open('http://bugs.launchpad.dev/firefox/+bug/4/+secrecy')
1540+ >>> browser.getControl('User Data').click()
1541 >>> browser.getControl('Change').click()
1542
1543 Now the badge is still shown for Sample Person...
1544
1545=== modified file 'lib/lp/code/stories/branches/xx-bug-branch-links.txt'
1546--- lib/lp/code/stories/branches/xx-bug-branch-links.txt 2011-11-28 00:35:15 +0000
1547+++ lib/lp/code/stories/branches/xx-bug-branch-links.txt 2012-06-26 06:02:24 +0000
1548@@ -81,12 +81,11 @@
1549 branch page for people that are not able to see it. Get an admin
1550 to mark the bug private.
1551
1552- >>> admin_browser.open('http://launchpad.dev/bugs/4')
1553- >>> admin_browser.getLink('This report is public').click()
1554- >>> admin_browser.getControl('This bug report should be private').click()
1555+ >>> admin_browser.open('http://launchpad.dev/firefox/+bug/4/+secrecy')
1556+ >>> admin_browser.getControl('User Data').click()
1557 >>> admin_browser.getControl('Change').click()
1558 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'privacy'))
1559- This report is private
1560+ This report contains User Data information...
1561
1562 Sample person can see it...
1563
1564
1565=== modified file 'lib/lp/code/templates/branch-portlet-privacy.pt'
1566--- lib/lp/code/templates/branch-portlet-privacy.pt 2012-06-07 18:27:33 +0000
1567+++ lib/lp/code/templates/branch-portlet-privacy.pt 2012-06-26 06:02:24 +0000
1568@@ -7,20 +7,8 @@
1569 class python: path('context/private') and 'portlet private' or 'portlet public'
1570 "
1571 >
1572- <tal:information_type tal:condition="view/show_information_type_in_ui">
1573 <span id="information-type-summary"
1574 tal:attributes="class view/information_type_css;">This branch
1575 contains <strong id="information-type" tal:content="view/information_type"></strong> information</span>
1576 <div id="information-type-description" style="padding-top: 5px" tal:content="view/information_type_description"></div>
1577- </tal:information_type>
1578- <tal:privacy tal:condition="not:view/show_information_type_in_ui">
1579- <div tal:condition="not:context/private"
1580- >This branch is public</div>
1581- <div tal:condition="context/private">
1582- This branch is <strong>private</strong>
1583- <tal:msg condition="not:context/explicitly_private">
1584- because it is stacked on a private branch.
1585- </tal:msg>
1586- </div>
1587- </tal:privacy>
1588 </div>
1589
1590=== modified file 'lib/lp/services/features/flags.py'
1591--- lib/lp/services/features/flags.py 2012-06-21 06:50:10 +0000
1592+++ lib/lp/services/features/flags.py 2012-06-26 06:02:24 +0000
1593@@ -326,13 +326,6 @@
1594 '',
1595 '',
1596 ''),
1597- ('disclosure.show_information_type_in_ui.enabled',
1598- 'boolean',
1599- ('If true, displays the information_type directly in the UI when '
1600- 'filing a bug and changing the information_type.'),
1601- '',
1602- '',
1603- ''),
1604 ('disclosure.information_type_notifications.enabled',
1605 'boolean',
1606 ('If true, calculate and store bugchange notifications to reference '
1607@@ -340,12 +333,6 @@
1608 '',
1609 '',
1610 ''),
1611- ('disclosure.show_information_type_in_branch_ui.enabled',
1612- 'boolean',
1613- 'If true, displays the information_type directly on branch pages.',
1614- '',
1615- '',
1616- ''),
1617 ])
1618
1619 # The set of all flag names that are documented.