← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~bac/launchpad/bug-607733 into lp:launchpad/devel

 

Brad Crittenden has proposed merging lp:~bac/launchpad/bug-607733 into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #607733 anon users cannot view swift and other projects with commercial subscriptions
  https://bugs.launchpad.net/bugs/607733


= Summary =

Projects with commercial subscriptions cannot be viewed by anonymous
users, which is horrible.

== Proposed fix ==

Change ICommercialSubscription read permission from launchpad.View to
zope.Public.

== Pre-implementation notes ==

None

== Implementation details ==

As above.

== Tests ==

bin/test -vvt xx-product-index.txt

== Demo and Q/A ==

Logout and look at https://launchpad.net/swift

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/configure.zcml
  lib/lp/registry/stories/product/xx-product-index.txt
-- 
https://code.launchpad.net/~bac/launchpad/bug-607733/+merge/31195
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/bug-607733 into lp:launchpad/devel.
=== modified file 'lib/lp/registry/configure.zcml'
--- lib/lp/registry/configure.zcml	2010-07-09 14:58:42 +0000
+++ lib/lp/registry/configure.zcml	2010-07-28 19:26:08 +0000
@@ -465,7 +465,7 @@
     <class
         class="lp.registry.model.commercialsubscription.CommercialSubscription">
         <require
-            permission="launchpad.View"
+            permission="zope.Public"
             interface="lp.registry.interfaces.commercialsubscription.ICommercialSubscription"/>
         <require
             permission="launchpad.Commercial"

=== modified file 'lib/lp/registry/stories/product/xx-product-index.txt'
--- lib/lp/registry/stories/product/xx-product-index.txt	2010-04-19 17:52:13 +0000
+++ lib/lp/registry/stories/product/xx-product-index.txt	2010-07-28 19:26:08 +0000
@@ -314,6 +314,20 @@
     ...                      'commercial_subscription'))
     Commercial subscription expires ...
 
+Regular Launchpad users will not see the message.
+
+    >>> user_browser.open('http://launchpad.dev/mega-money-maker')
+    >>> print extract_text(find_tag_by_id(user_browser.contents,
+    ...                      'commercial_subscription'))
+    Commercial subscription expires ...
+
+And anonymous users also see the expiration message.
+
+    >>> anon_browser.open('http://launchpad.dev/mega-money-maker')
+    >>> print extract_text(find_tag_by_id(anon_browser.contents,
+    ...                      'commercial_subscription'))
+    Commercial subscription expires ...
+
 
 Development
 -----------