← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/restricted-is-default into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/restricted-is-default into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/restricted-is-default/+merge/111306

Summary
=======
The current default when creating a team is MODERATED. This switches to
RESTRICTED--which becomes the only available option--when the team is set to
PRIVATE, but only for JS enabled browsers.

To make this safer for non js enabled browsers, the default should just be
RESTRICTED.

Preimp
======
Spoke with Curtis Hovey

Imp
===
Switch the defaults in the interface/model.

Tests
=====
This default was never actually tested, which makes sense; the setting of
defaults is done via other tested code.

Still, if you want to test this--

bin/test -vvcm lp.registry

QA
==
Check that the default in +newteam defaults to RESTRICTED.

Lint
====
This branch is lint free.

-- 
https://code.launchpad.net/~jcsackett/launchpad/restricted-is-default/+merge/111306
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/restricted-is-default into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py	2012-06-10 09:06:08 +0000
+++ lib/lp/registry/interfaces/person.py	2012-06-20 20:37:19 +0000
@@ -1942,7 +1942,7 @@
     subscriptionpolicy = exported(
         TeamSubsciptionPolicyChoice(title=_('Subscription policy'),
                vocabulary=TeamSubscriptionPolicy,
-               default=TeamSubscriptionPolicy.MODERATED, required=True,
+               default=TeamSubscriptionPolicy.RESTRICTED, required=True,
                description=_(
                 TeamSubscriptionPolicy.__doc__.split('\n\n')[1])),
         exported_as='subscription_policy')

=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py	2012-06-13 21:40:11 +0000
+++ lib/lp/registry/model/person.py	2012-06-20 20:37:19 +0000
@@ -587,7 +587,7 @@
     subscriptionpolicy = EnumCol(
         dbName='subscriptionpolicy',
         enum=TeamSubscriptionPolicy,
-        default=TeamSubscriptionPolicy.MODERATED,
+        default=TeamSubscriptionPolicy.RESTRICTED,
         storm_validator=validate_subscription_policy)
     defaultrenewalperiod = IntCol(dbName='defaultrenewalperiod', default=None)
     defaultmembershipperiod = IntCol(dbName='defaultmembershipperiod',


Follow ups