← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~abentley/launchpad/beta-banner into lp:launchpad

 

Aaron Bentley has proposed merging lp:~abentley/launchpad/beta-banner into lp:launchpad.

Commit message:
Enable showing the beta banner.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1071207 in Launchpad itself: "Project creation doesn't display beta banner when privacy is enabled"
  https://bugs.launchpad.net/launchpad/+bug/1071207

For more details, see:
https://code.launchpad.net/~abentley/launchpad/beta-banner/+merge/131346

= Summary =
Enable showing beta banner on Project creation.

== Proposed fix ==
Add disclosure.private_projects.enabled to related_features for ProductAddView

== Pre-implementation notes ==
Discussed with deryck

== LOC Rationale ==
Part of Private Projects

== Implementation details ==
Add  related_features, switch URL to deryck's upcoming blog post.

== Tests ==
bin/test -t test_view_data_model test_product

== Demo and Q/A ==
Enable disclosure.private_projects.enabled for a specific Person or Team, but have the default be disabled.  Go to https://qastaging.launchpad.net/projects/+new

The beta banner should be displayed, and should link to http://blog.launchpad.net/general/private-projects-beta (which may be a 404).

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/browser/product.py
  lib/lp/registry/browser/tests/test_product.py
  lib/lp/services/features/flags.py
-- 
https://code.launchpad.net/~abentley/launchpad/beta-banner/+merge/131346
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/launchpad/beta-banner into lp:launchpad.
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2012-10-16 00:57:45 +0000
+++ lib/lp/registry/browser/product.py	2012-10-25 09:16:21 +0000
@@ -2166,6 +2166,7 @@
     """The controlling view for product/+new."""
 
     page_title = ProjectAddStepOne.page_title
+    related_features = (PRIVATE_PROJECTS_FLAG,)
     total_steps = 2
 
     @property

=== modified file 'lib/lp/registry/browser/tests/test_product.py'
--- lib/lp/registry/browser/tests/test_product.py	2012-10-16 23:43:16 +0000
+++ lib/lp/registry/browser/tests/test_product.py	2012-10-25 09:16:21 +0000
@@ -28,6 +28,7 @@
     ServiceUsage,
     )
 from lp.registry.browser.product import (
+    PRIVATE_PROJECTS_FLAG,
     ProjectAddStepOne,
     ProjectAddStepTwo,
     )
@@ -39,7 +40,9 @@
     IProductSet,
     License,
     )
-from lp.registry.model.product import Product
+from lp.registry.model.product import (
+    Product,
+    )
 from lp.services.config import config
 from lp.services.database.lpstorm import IStore
 from lp.services.features.testing import FeatureFixture
@@ -177,6 +180,7 @@
         self.assertContentEqual(
             team_membership_policy_data,
             cache.objects['team_membership_policy_data'])
+        self.assertIn(PRIVATE_PROJECTS_FLAG, cache.objects['related_features'])
 
     def test_staging_message_is_not_demo(self):
         view = create_initialized_view(self.product_set, '+new')

=== modified file 'lib/lp/services/features/flags.py'
--- lib/lp/services/features/flags.py	2012-10-25 06:59:34 +0000
+++ lib/lp/services/features/flags.py	2012-10-25 09:16:21 +0000
@@ -237,7 +237,7 @@
      'If true, enabled access to private project registration features.',
      'disabled',
      '',
-     'https://dev.launchpad.net/LEP/PrivateProjects'),
+     'http://blog.launchpad.net/general/private-projects-beta'),
     ('disclosure.private_project.traversal_override',
      'boolean',
      'If set, allow all users to traverse to private projects.',


Follow ups