launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #09982
[Merge] lp:~wallyworld/launchpad/information-type-verbosity-1015509 into lp:launchpad
Ian Booth has proposed merging lp:~wallyworld/launchpad/information-type-verbosity-1015509 into lp:launchpad.
Requested reviews:
Curtis Hovey (sinzui)
Related bugs:
Bug #1015509 in Launchpad itself: "Embargoed box is far too wordy"
https://bugs.launchpad.net/launchpad/+bug/1015509
For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/information-type-verbosity-1015509/+merge/115253
Another attempt to make acceptable InformationType descrptions. Key points:
- less words
- remove 'resolved' from unembargoed security
- use 'security group' for embargoed security
- make the sentence construction consistent/similar for each type
- make the description for "User Data" oblivious as to whether the 'disclosure.display_userdata_as_private.enabled' feature flag is on by using the word generic word 'confidential'
--
https://code.launchpad.net/~wallyworld/launchpad/information-type-verbosity-1015509/+merge/115253
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/app/browser/informationtype.py'
--- lib/lp/app/browser/informationtype.py 2012-07-09 04:14:09 +0000
+++ lib/lp/app/browser/informationtype.py 2012-07-17 00:06:45 +0000
@@ -47,15 +47,7 @@
@property
def information_type_description(self):
- # This can be replaced with just a return when the feature flag is
- # dropped.
- description = self.context.information_type.description
- if (self.context.information_type == InformationType.USERDATA and
- self.show_userdata_as_private):
- description = (
- 'Visible only to users with whom the project has '
- 'shared private information.')
- return description
+ return self.context.information_type.description
@property
def information_type_css(self):
=== modified file 'lib/lp/bugs/browser/tests/test_bugview.py'
--- lib/lp/bugs/browser/tests/test_bugview.py 2012-07-10 10:28:16 +0000
+++ lib/lp/bugs/browser/tests/test_bugview.py 2012-07-17 00:06:45 +0000
@@ -85,10 +85,6 @@
with FeatureFixture(feature_flag):
view = BugView(self.bug, LaunchpadTestRequest())
self.assertEqual('Private', view.information_type)
- self.assertTextMatchesExpressionIgnoreWhitespace(
- 'Visible only to users with whom the project has shared '
- 'private information.',
- view.information_type_description)
def test_proprietary_excluded_for_normal_projects(self):
# The Proprietary information type isn't in the JSON request cache for
=== modified file 'lib/lp/code/browser/tests/test_branch.py'
--- lib/lp/code/browser/tests/test_branch.py 2012-07-13 01:28:30 +0000
+++ lib/lp/code/browser/tests/test_branch.py 2012-07-17 00:06:45 +0000
@@ -1066,10 +1066,6 @@
information_type = soup.find('strong')
description = soup.find('div', id='information-type-description')
self.assertEqual('User Data', information_type.renderContents())
- self.assertTextMatchesExpressionIgnoreWhitespace(
- 'Visible only to users with whom the project has shared '
- 'information containing user data.',
- description.renderContents())
def test_information_type_in_ui_with_display_as_private(self):
# With display_userdata_as_private, the information_type is shown
@@ -1086,7 +1082,3 @@
information_type = soup.find('strong')
description = soup.find('div', id='information-type-description')
self.assertEqual('Private', information_type.renderContents())
- self.assertTextMatchesExpressionIgnoreWhitespace(
- 'Visible only to users with whom the project has shared '
- 'private information.',
- description.renderContents())
=== modified file 'lib/lp/registry/enums.py'
--- lib/lp/registry/enums.py 2012-07-13 08:29:56 +0000
+++ lib/lp/registry/enums.py 2012-07-17 00:06:45 +0000
@@ -40,29 +40,25 @@
UNEMBARGOEDSECURITY = DBItem(2, """
Unembargoed Security
- Everyone can see this information pertaining to a resolved security
- related bug.
+ Everyone can see this security related information.
""")
EMBARGOEDSECURITY = DBItem(3, """
Embargoed Security
- Visible only to users with whom the project has shared embargoed
- security information.
+ Only the security group can see this information.
""")
USERDATA = DBItem(4, """
User Data
- Visible only to users with whom the project has shared information
- containing user data.
+ Only shared with users permitted to see confidential information.
""")
PROPRIETARY = DBItem(5, """
Proprietary
- Visible only to users with whom the project has shared proprietary
- information.
+ Only shared with users permitted to see proprietary information.
""")
=== modified file 'lib/lp/registry/tests/test_information_type_vocabulary.py'
--- lib/lp/registry/tests/test_information_type_vocabulary.py 2012-07-09 22:38:22 +0000
+++ lib/lp/registry/tests/test_information_type_vocabulary.py 2012-07-17 00:06:45 +0000
@@ -104,19 +104,11 @@
vocab = InformationTypeVocabulary()
term = vocab.getTermByToken('USERDATA')
self.assertEqual('Private', term.title)
- self.assertTextMatchesExpressionIgnoreWhitespace(
- "Visible only to users with whom the project has "
- "shared private information.",
- term.description)
def test_userdata(self):
vocab = InformationTypeVocabulary()
term = vocab.getTermByToken('USERDATA')
self.assertEqual('User Data', term.title)
- self.assertTextMatchesExpressionIgnoreWhitespace(
- "Visible only to users with whom the project has shared "
- "information containing user data.",
- term.description)
def test_multi_pillar_bugs(self):
# Multi-pillar bugs are forbidden from being PROPRIETARY, no matter
=== modified file 'lib/lp/registry/vocabularies.py'
--- lib/lp/registry/vocabularies.py 2012-07-10 10:09:46 +0000
+++ lib/lp/registry/vocabularies.py 2012-07-17 00:06:45 +0000
@@ -2246,12 +2246,12 @@
def __init__(self, context=None, public_only=False, private_only=False):
types = []
+ show_userdata_as_private = bool(getFeatureFlag(
+ 'disclosure.display_userdata_as_private.enabled'))
if not public_only:
types = [
InformationType.EMBARGOEDSECURITY,
InformationType.USERDATA]
- show_userdata_as_private = bool(getFeatureFlag(
- 'disclosure.display_userdata_as_private.enabled'))
# So long as not disabled by the feature flag, Proprietary is
# allowed for:
# - single pillar bugs where the target has a current commercial
@@ -2290,14 +2290,10 @@
terms = []
for type in types:
title = type.title
- description = type.description
if type == InformationType.USERDATA and show_userdata_as_private:
title = 'Private'
- description = (
- 'Visible only to users with whom the project has '
- 'shared private information.')
term = SimpleTerm(type, type.name, title)
term.name = type.name
- term.description = description
+ term.description = type.description
terms.append(term)
super(InformationTypeVocabulary, self).__init__(terms)
Follow ups