Merge lp:~bac/launchpad/bug-602773 into lp:launchpad/db-devel

Proposed by Brad Crittenden
Status: Merged
Approved by: Edwin Grubbs
Approved revision: no longer in the source branch.
Merged at revision: 9591
Proposed branch: lp:~bac/launchpad/bug-602773
Merge into: lp:launchpad/db-devel
Diff against target: 1684 lines (+199/-284)
51 files modified
database/sampledata/current-dev.sql (+2/-2)
database/sampledata/current.sql (+2/-2)
database/schema/Makefile (+2/-0)
lib/canonical/launchpad/doc/tales.txt (+1/-1)
lib/canonical/launchpad/fields/__init__.py (+2/-28)
lib/canonical/launchpad/security.py (+5/-6)
lib/lp/bugs/browser/bugtask.py (+6/-5)
lib/lp/bugs/interfaces/bugsubscription.py (+4/-3)
lib/lp/bugs/interfaces/bugsupervisor.py (+2/-2)
lib/lp/bugs/interfaces/bugtask.py (+2/-2)
lib/lp/bugs/model/bugactivity.py (+2/-3)
lib/lp/bugs/model/bugsubscription.py (+3/-4)
lib/lp/bugs/model/bugtask.py (+35/-35)
lib/lp/code/interfaces/branch.py (+2/-2)
lib/lp/code/interfaces/branchsubscription.py (+3/-3)
lib/lp/code/interfaces/branchvisibilitypolicy.py (+2/-2)
lib/lp/code/interfaces/sourcepackagerecipe.py (+2/-2)
lib/lp/code/model/branch.py (+2/-2)
lib/lp/code/model/branchsubscription.py (+3/-4)
lib/lp/code/model/branchvisibilitypolicy.py (+2/-3)
lib/lp/registry/browser/person.py (+7/-10)
lib/lp/registry/browser/team.py (+0/-22)
lib/lp/registry/browser/tests/mailinglist-views.txt (+1/-1)
lib/lp/registry/doc/person.txt (+1/-1)
lib/lp/registry/doc/private-team-roles.txt (+1/-1)
lib/lp/registry/doc/private-team-visibility.txt (+2/-3)
lib/lp/registry/doc/vocabularies.txt (+5/-13)
lib/lp/registry/interfaces/person.py (+14/-20)
lib/lp/registry/interfaces/product.py (+3/-3)
lib/lp/registry/interfaces/productrelease.py (+4/-2)
lib/lp/registry/interfaces/productseries.py (+3/-3)
lib/lp/registry/interfaces/structuralsubscription.py (+13/-7)
lib/lp/registry/model/distribution.py (+3/-3)
lib/lp/registry/model/person.py (+1/-8)
lib/lp/registry/model/product.py (+5/-7)
lib/lp/registry/model/productrelease.py (+2/-2)
lib/lp/registry/model/productseries.py (+3/-4)
lib/lp/registry/model/structuralsubscription.py (+4/-3)
lib/lp/registry/tests/mailinglists_helper.py (+3/-2)
lib/lp/registry/tests/test_person.py (+1/-14)
lib/lp/registry/tests/test_user_vocabularies.py (+1/-1)
lib/lp/registry/vocabularies.py (+2/-4)
lib/lp/soyuz/browser/archive.py (+10/-9)
lib/lp/soyuz/browser/archivesubscription.py (+3/-6)
lib/lp/soyuz/interfaces/archive.py (+11/-10)
lib/lp/soyuz/interfaces/archivesubscriber.py (+2/-2)
lib/lp/soyuz/model/archive.py (+2/-3)
lib/lp/soyuz/model/archivesubscriber.py (+2/-3)
lib/lp/translations/interfaces/potemplate.py (+2/-2)
lib/lp/translations/interfaces/translationimportqueue.py (+2/-2)
lib/lp/translations/model/translationimportqueue.py (+2/-2)
To merge this branch: bzr merge lp:~bac/launchpad/bug-602773
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+31162@code.launchpad.net

Commit message

Fully remove PRIVATE_MEMBERSHIP teams.

Description of the change

= Summary =

Private membership teams can now be replaced by PRIVATE teams. Having
both does nothing but cause confusion.

Sorry for the super-big branch. It didn't make sense to do this piecemeal.

== Proposed fix ==

The UI was previously fixed to not allow the creation of new PMTs. This
follow-on branch removes the dbenum and all uses of PMTs.

All PMTs in the production database were converted to private teams. It
is no longer possible to create new ones if using the UI on edge. All
members of commerical-admins have been notified and asked not to create
new ones on lpnet.

Before the next rollout we must ensure no PMTs have crept back into the
database.

== Pre-implementation notes ==

Chats with Curtis.

== Implementation details ==

As above.

== Tests ==

make check

== Demo and Q/A ==

No real way to demo since the UI changes landed earlier.

= Launchpad lint =

I'll look into these lint issues but I suspect many are false.

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/code/model/branchvisibilitypolicy.py
  lib/lp/soyuz/model/archivesubscriber.py
  lib/lp/translations/interfaces/potemplate.py
  database/sampledata/current.sql
  database/sampledata/current-dev.sql
  lib/lp/bugs/model/bugsubscription.py
  lib/canonical/launchpad/security.py
  lib/lp/registry/vocabularies.py
  lib/lp/registry/model/productseries.py
  lib/lp/registry/interfaces/productrelease.py
  lib/lp/registry/tests/test_user_vocabularies.py
  lib/lp/code/interfaces/branch.py
  lib/lp/soyuz/interfaces/archive.py
  lib/lp/registry/model/productrelease.py
  lib/lp/registry/doc/private-team-roles.txt
  lib/lp/registry/browser/team.py
  lib/lp/registry/browser/tests/mailinglist-views.txt
  lib/lp/translations/model/translationimportqueue.py
  lib/lp/registry/interfaces/product.py
  lib/lp/registry/interfaces/structuralsubscription.py
  lib/lp/registry/doc/private-team-visibility.txt
  lib/lp/soyuz/interfaces/archivesubscriber.py
  lib/lp/registry/doc/vocabularies.txt
  lib/canonical/launchpad/fields/__init__.py
  lib/canonical/launchpad/doc/tales.txt
  lib/lp/code/model/branchsubscription.py
  lib/lp/soyuz/browser/archivesubscription.py
  lib/lp/code/model/branch.py
  lib/lp/registry/interfaces/productseries.py
  lib/lp/bugs/model/bugactivity.py
  lib/lp/bugs/interfaces/bugsubscription.py
  lib/lp/registry/model/structuralsubscription.py
  lib/lp/bugs/browser/bugtask.py
  lib/lp/registry/doc/person.txt
  lib/lp/registry/interfaces/person.py
  lib/lp/registry/model/product.py
  lib/lp/soyuz/model/archive.py
  lib/lp/bugs/interfaces/bugsupervisor.py
  lib/lp/code/interfaces/sourcepackagerecipe.py
  lib/lp/registry/browser/person.py
  lib/lp/registry/model/person.py
  lib/lp/code/interfaces/branchvisibilitypolicy.py
  lib/lp/registry/tests/test_person.py
  lib/lp/registry/tests/mailinglists_helper.py
  lib/lp/code/interfaces/branchsubscription.py
  lib/lp/bugs/model/bugtask.py
  lib/lp/registry/model/distribution.py
  lib/lp/bugs/interfaces/bugtask.py
  lib/lp/translations/interfaces/translationimportqueue.py
  lib/lp/soyuz/browser/archive.py

./lib/lp/translations/interfaces/potemplate.py
     736: E301 expected 1 blank line, found 2
     750: E301 expected 1 blank line, found 2
./lib/lp/bugs/model/bugsubscription.py
      31: E202 whitespace before ')'
      38: E202 whitespace before ')'
./lib/canonical/launchpad/security.py
     645: E302 expected 2 blank lines, found 1
    1261: E302 expected 2 blank lines, found 1
    1485: E302 expected 2 blank lines, found 1
./lib/lp/registry/vocabularies.py
     180: E302 expected 2 blank lines, found 1
     223: E202 whitespace before ')'
     231: E302 expected 2 blank lines, found 1
     271: E202 whitespace before ')'
     549: E202 whitespace before ')'
     631: E302 expected 2 blank lines, found 1
     984: E202 whitespace before ')'
    1272: E202 whitespace before ']'
    1411: E202 whitespace before ')'
    1429: E202 whitespace before ')'
    1508: E301 expected 1 blank line, found 0
./lib/lp/registry/interfaces/productrelease.py
     213: E202 whitespace before ')'
     260: E202 whitespace before ')'
     269: E202 whitespace before ')'
     277: E202 whitespace before ')'
     301: E202 whitespace before ')'
     307: E202 whitespace before ')'
     323: E202 whitespace before ')'
     360: E302 expected 2 blank lines, found 1
./lib/lp/code/interfaces/branch.py
    1113: Line exceeds 78 characters.
./lib/lp/soyuz/interfaces/archive.py
     528: E301 expected 1 blank line, found 0
     545: E202 whitespace before ')'
     570: E501 line too long (81 characters)
     572: E501 line too long (80 characters)
     577: E501 line too long (81 characters)
     580: E501 line too long (80 characters)
     655: E301 expected 1 blank line, found 0
     678: E301 expected 1 blank line, found 0
     701: E301 expected 1 blank line, found 0
     801: E301 expected 1 blank line, found 0
    1138: E302 expected 2 blank lines, found 1
    1435: E301 expected 1 blank line, found 2
    1664: E303 too many blank lines (3)
     521: Line exceeds 78 characters.
     570: Line exceeds 78 characters.
     572: Line exceeds 78 characters.
     577: Line exceeds 78 characters.
     580: Line exceeds 78 characters.
    1449: Line exceeds 78 characters.
./lib/lp/registry/browser/team.py
     128: E241 multiple spaces after ','
./lib/lp/translations/model/translationimportqueue.py
    1235: E202 whitespace before ']'
./lib/lp/registry/interfaces/product.py
     899: E301 expected 1 blank line, found 2
./lib/lp/registry/interfaces/structuralsubscription.py
      52: E501 line too long (106 characters)
      58: E501 line too long (130 characters)
      64: E501 line too long (149 characters)
      83: E501 line too long (125 characters)
      89: E501 line too long (143 characters)
      52: Line exceeds 78 characters.
      58: Line exceeds 78 characters.
      64: Line exceeds 78 characters.
      83: Line exceeds 78 characters.
      89: Line exceeds 78 characters.
./lib/lp/registry/doc/private-team-visibility.txt
      41: want exceeds 78 characters.
      46: want exceeds 78 characters.
      66: want exceeds 78 characters.
      92: want exceeds 78 characters.
./lib/lp/soyuz/interfaces/archivesubscriber.py
      15: E202 whitespace before ']'
     112: E302 expected 2 blank lines, found 1
./lib/lp/registry/doc/vocabularies.txt
       0: narrative uses a moin header.
      23: narrative uses a moin header.
     181: narrative uses a moin header.
     225: narrative uses a moin header.
     311: narrative uses a moin header.
     336: narrative uses a moin header.
     494: narrative uses a moin header.
     508: narrative uses a moin header.
     542: narrative uses a moin header.
     583: narrative uses a moin header.
     601: narrative uses a moin header.
     692: narrative uses a moin header.
     711: narrative uses a moin header.
     743: narrative uses a moin header.
     949: narrative uses a moin header.
    1050: narrative uses a moin header.
    1101: narrative uses a moin header.
    1143: narrative uses a moin header.
    1187: narrative uses a moin header.
    1248: narrative uses a moin header.
    1311: narrative uses a moin header.
    1346: narrative uses a moin header.
./lib/canonical/launchpad/fields/__init__.py
      89: E302 expected 2 blank lines, found 1
     218: E302 expected 2 blank lines, found 1
     238: E302 expected 2 blank lines, found 1
     244: E302 expected 2 blank lines, found 1
     254: E302 expected 2 blank lines, found 1
     265: E302 expected 2 blank lines, found 1
     341: E301 expected 1 blank line, found 0
     545: E302 expected 2 blank lines, found 1
     174: Line exceeds 78 characters.
./lib/lp/soyuz/browser/archivesubscription.py
     204: E202 whitespace before ')'
     316: E202 whitespace before '}'
./lib/lp/registry/model/structuralsubscription.py
     108: W602 deprecated form of raising exception
     113: E301 expected 1 blank line, found 0
     241: E231 missing whitespace after ','
./lib/lp/bugs/browser/bugtask.py
     174: E301 expected 1 blank line, found 0
     183: E302 expected 2 blank lines, found 1
     187: E301 expected 1 blank line, found 0
     197: E302 expected 2 blank lines, found 1
     208: E302 expected 2 blank lines, found 1
     221: W601 .has_key() is deprecated, use 'in'
     989: E202 whitespace before '}'
    1357: E231 missing whitespace after ','
    1732: E241 multiple spaces after ','
    2173: E301 expected 1 blank line, found 2
    2254: E231 missing whitespace after ','
    2818: E203 whitespace before ':'
    2971: E302 expected 2 blank lines, found 3
    3035: E231 missing whitespace after ','
    3292: E202 whitespace before ')'
    3771: E301 expected 1 blank line, found 0
    1115: Line exceeds 78 characters.
    2096: Line exceeds 78 characters.
./lib/lp/registry/interfaces/person.py
     134: E301 expected 1 blank line, found 0
     447: E302 expected 2 blank lines, found 1
./lib/lp/registry/model/product.py
      83: 'IBranchSet' imported but unused
      81: 'shortlist' imported but unused
./lib/lp/soyuz/model/archive.py
     338: E203 whitespace before ':'
     433: E231 missing whitespace after ','
     503: E231 missing whitespace after ','
     545: E231 missing whitespace after ','
     570: E211 whitespace before '('
     617: E231 missing whitespace after ','
     626: E231 missing whitespace after ','
     650: E203 whitespace before ','
     722: E202 whitespace before ']'
     752: E203 whitespace before ':'
     777: E301 expected 1 blank line, found 0
     916: E202 whitespace before ')'
     924: E202 whitespace before ')'
     957: E202 whitespace before '}'
    1671: E301 expected 1 blank line, found 2
    1780: E301 expected 1 blank line, found 2
    1854: E231 missing whitespace after ','
    1979: E231 missing whitespace after ','
./lib/lp/code/interfaces/sourcepackagerecipe.py
      31: E202 whitespace before ')'
      58: E231 missing whitespace after ','
     135: E202 whitespace before ')'
     135: E231 missing whitespace after ','
./lib/lp/registry/tests/test_person.py
      29: 'BugSubscription' imported but unused
      29: 'BugTask' imported but unused
./lib/lp/registry/tests/mailinglists_helper.py
      48: E301 expected 1 blank line, found 0
./lib/lp/code/interfaces/branchsubscription.py
      75: E202 whitespace before ')'
./lib/lp/bugs/model/bugtask.py
      96: E241 multiple spaces after ':'
      96: E222 multiple spaces after operator
     147: E302 expected 2 blank lines, found 1
     194: E301 expected 1 blank line, found 0
     399: E202 whitespace before '}'
     415: E301 expected 1 blank line, found 0
     481: E231 missing whitespace after ','
     527: E221 multiple spaces before operator
     588: E222 multiple spaces after operator
     774: W602 deprecated form of raising exception
     833: E231 missing whitespace after ','
    1103: E222 multiple spaces after operator
    1105: E222 multiple spaces after operator
    1669: E501 line too long (80 characters)
    1645: E201 whitespace after '('
    1746: E501 line too long (80 characters)
    1838: E231 missing whitespace after ','
    1669: Line exceeds 78 characters.
    1672: Line exceeds 78 characters.
    1746: Line exceeds 78 characters.
./lib/lp/registry/model/distribution.py
     204: E301 expected 1 blank line, found 2
     450: E203 whitespace before ':'
     665: E222 multiple spaces after operator
     990: E202 whitespace before ')'
     998: E202 whitespace before ']'
    1039: E202 whitespace before ')'
    1059: E202 whitespace before ')'
    1092: E231 missing whitespace after ','
    1096: E231 missing whitespace after ','
    1108: E231 missing whitespace after ','
    1124: E202 whitespace before ')'
    1372: E203 whitespace before ':'
./lib/lp/soyuz/browser/archive.py
     295: E301 expected 1 blank line, found 0
     374: E301 expected 1 blank line, found 0
     525: E301 expected 1 blank line, found 0
     633: E301 expected 1 blank line, found 2
     740: W601 .has_key() is deprecated, use 'in'
     921: E202 whitespace before '}'
    1163: E302 expected 2 blank lines, found 1
    1863: E302 expected 2 blank lines, found 1
    1919: E222 multiple spaces after operator

To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Brad,

I'm glad you worked did this, since it doesn't look like fun, but it's very important. I'm wondering if the valid_person storm_validator is even necessary, since it appears to only to check whether IPerson.providedBy() is true. We can discuss this more when I get back from lunch. I'm marking it needs-fixing until then.

I have just one comment below.

-Edwin

>=== modified file 'lib/lp/registry/vocabularies.py'
>--- lib/lp/registry/vocabularies.py 2010-06-04 09:31:21 +0000
>+++ lib/lp/registry/vocabularies.py 2010-07-28 15:12:59 +0000
>@@ -442,8 +442,7 @@
> private_query = AND(
> Not(Person.teamowner == None),
> OR(
>- Person.visibility == PersonVisibility.PRIVATE,
>- Person.visibility == PersonVisibility.PRIVATE_MEMBERSHIP))
>+ Person.visibility == PersonVisibility.PRIVATE))
>

You can get rid of the OR() since it only has a single argument.
I'm surprised that it doesn't raise an exception.

>
> else:
> private_query = AND(
> TeamParticipation.person == logged_in_user.id,

review: Needs Fixing (code)
Revision history for this message
Edwin Grubbs (edwin-grubbs) :
review: Approve (code)
Revision history for this message
Brad Crittenden (bac) wrote :

I have removed the validate_person and fixed the dumb OR().

http://pastebin.ubuntu.com/470393/

Thanks for wading through this review. And thanks to Jono for the emacs bzr-tools-grep!

Revision history for this message
Brad Crittenden (bac) wrote :

My changes to make lint a *little* happier.

http://pastebin.ubuntu.com/470404/

Revision history for this message
Brad Crittenden (bac) wrote :

Edwin,

I removed the validate_person and then discovered it was doing more than we originally thought. Many tests broke with its removal as they were counting on it to check for None, etc. I have restored validate_person.

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 2010-07-28 16:39:53 +0000
3+++ database/sampledata/current-dev.sql 2010-07-29 20:21:16 +0000
4@@ -1786,7 +1786,7 @@
5 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243609, 'Katie', NULL, NULL, 'katie', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-07 13:43:20.393704', NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243609);
6 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243610, 'Gold Member', NULL, NULL, 'member', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243610);
7 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243611, 'Owner', NULL, NULL, 'owner', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243611);
8-INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 20, false, NULL);
9+INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 30, false, NULL);
10 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243613, 'Other Team', 243611, NULL, 'otherteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL);
11 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243614, 'josh', NULL, NULL, 'jbuhl-nospam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243614);
12 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243615, 'Sjoerd Simons', NULL, NULL, 'sjoerd', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243615);
13@@ -5046,7 +5046,7 @@
14 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243609, 'Katie', NULL, NULL, 'katie', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-07 13:43:20.393704', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243609);
15 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243610, 'Gold Member', NULL, NULL, 'member', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243610);
16 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243611, 'Owner', NULL, NULL, 'owner', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243611);
17-INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 20, false, NULL);
18+INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 30, false, NULL);
19 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243613, 'Other Team', 243611, NULL, 'otherteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL);
20 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243614, 'josh', NULL, NULL, 'jbuhl-nospam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243614);
21 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243615, 'Sjoerd Simons', NULL, NULL, 'sjoerd', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 243615);
22
23=== modified file 'database/sampledata/current.sql'
24--- database/sampledata/current.sql 2010-07-28 16:39:53 +0000
25+++ database/sampledata/current.sql 2010-07-29 20:21:16 +0000
26@@ -1765,7 +1765,7 @@
27 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243609, 'Katie', NULL, NULL, 'katie', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-07 13:43:20.393704', NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436091);
28 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243610, 'Gold Member', NULL, NULL, 'member', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436101);
29 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243611, 'Owner', NULL, NULL, 'owner', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436111);
30-INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 20, false, NULL);
31+INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 30, false, NULL);
32 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243613, 'Other Team', 243611, NULL, 'otherteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL);
33 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243614, 'josh', NULL, NULL, 'jbuhl-nospam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436141);
34 INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243615, 'Sjoerd Simons', NULL, NULL, 'sjoerd', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436151);
35@@ -4972,7 +4972,7 @@
36 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243609, 'Katie', NULL, NULL, 'katie', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-07 13:43:20.393704', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436091);
37 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243610, 'Gold Member', NULL, NULL, 'member', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436101);
38 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243611, 'Owner', NULL, NULL, 'owner', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 1, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436111);
39-INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 20, false, NULL);
40+INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243612, 'My Team', 243611, NULL, 'myteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 30, false, NULL);
41 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243613, 'Other Team', 243611, NULL, 'otherteam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-14 16:52:15.403833', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL);
42 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243614, 'josh', NULL, NULL, 'jbuhl-nospam', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436141);
43 INSERT INTO lp_person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (243615, 'Sjoerd Simons', NULL, NULL, 'sjoerd', NULL, NULL, NULL, NULL, 1, NULL, '2007-12-18 16:31:34.790641', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 15, 'when the comments for debbugs #308994 were imported into Launchpad.', 62, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 2436151);
44
45=== modified file 'database/schema/Makefile'
46--- database/schema/Makefile 2010-07-10 10:15:14 +0000
47+++ database/schema/Makefile 2010-07-29 20:21:16 +0000
48@@ -50,6 +50,8 @@
49 # given database ($1) into an SQL file ($2).
50 build_new_sampledata=$(PYTHON) fti.py --null -d ${1} -q; \
51 echo $(HEADER) > $(2); \
52+ echo -n "-- Created using " >> $(2); \
53+ pg_dump --version >> $(2); \
54 pg_dump --schema=public --disable-triggers -a --column-inserts -O ${1} \
55 | grep -v "\( TOC \|INSERT INTO launchpaddatabaserevision \|sessiondata\|sessionpkgdata\|SELECT pg_catalog\.setval\|^--\| fticache \|'fticache'\|ALTER TABLE secret\|INSERT INTO secret\)" \
56 | $(PYTHON) sort_sql.py >> $(2); \
57
58=== modified file 'lib/canonical/launchpad/doc/tales.txt'
59--- lib/canonical/launchpad/doc/tales.txt 2010-07-15 08:38:19 +0000
60+++ lib/canonical/launchpad/doc/tales.txt 2010-07-29 20:21:16 +0000
61@@ -1566,7 +1566,7 @@
62 data for link, displayname, and unique_displayname if the current user
63 has the appropriate privileges.
64
65-The team 'myteam' is a private membership team so only the team members
66+The team 'myteam' is a private team so only the team members
67 and Launchpad admins can see the details.
68
69 Foo Bar is an administrator so he can see all.
70
71=== modified file 'lib/canonical/launchpad/fields/__init__.py'
72--- lib/canonical/launchpad/fields/__init__.py 2010-07-22 12:17:41 +0000
73+++ lib/canonical/launchpad/fields/__init__.py 2010-07-29 20:21:16 +0000
74@@ -34,7 +34,6 @@
75 'MugshotImageUpload',
76 'NoneableDescription',
77 'NoneableTextLine',
78- 'ParticipatingPersonChoice',
79 'PasswordField',
80 'PersonChoice',
81 'PillarAliases',
82@@ -53,7 +52,6 @@
83 'URIField',
84 'UniqueField',
85 'Whiteboard',
86- 'is_private_membership_person',
87 'is_public_person',
88 ]
89
90@@ -173,7 +171,8 @@
91
92 * whitespace is stripped from the input value
93 * if the field requires (or forbids) a trailing slash on the URI,
94- ensures that the widget ends in a slash (or doesn't end in a slash).
95+ ensures that the widget ends in a slash (or doesn't end in a
96+ slash).
97 * the URI is canonicalized.
98 """
99
100@@ -766,14 +765,6 @@
101 return person.visibility == PersonVisibility.PUBLIC
102
103
104-def is_private_membership_person(person):
105- """True if the person/team has private membership visibility."""
106- from canonical.launchpad.interfaces import IPerson, PersonVisibility
107- if not IPerson.providedBy(person):
108- return False
109- return person.visibility == PersonVisibility.PRIVATE_MEMBERSHIP
110-
111-
112 class PrivateTeamNotAllowed(ConstraintNotSatisfied):
113 __doc__ = _("A private team is not allowed.")
114
115@@ -801,20 +792,3 @@
116 else:
117 # The vocabulary prevents the revealing of private team names.
118 raise PrivateTeamNotAllowed(value)
119-
120-
121-class ParticipatingPersonChoice(PersonChoice):
122- """A person or team who is not a private membership team.
123-
124- A person can participate in all contexts. A PRIVATE team can participate
125- in many contexts, depending up on the permissions of the logged in
126- user. A PRIVATE MEMBERSHIP team is severely limited in the roles in which
127- it can participate.
128- """
129-
130- def constraint(self, value):
131- if not is_private_membership_person(value):
132- return True
133- else:
134- # The vocabulary prevents the revealing of private team names.
135- raise PrivateMembershipTeamNotAllowed(value)
136
137=== modified file 'lib/canonical/launchpad/security.py'
138--- lib/canonical/launchpad/security.py 2010-07-26 19:22:16 +0000
139+++ lib/canonical/launchpad/security.py 2010-07-29 20:21:16 +0000
140@@ -654,7 +654,7 @@
141 """Verify that the user can view the team's membership.
142
143 Anyone can see a public team's membership. Only a team member or
144- a Launchpad admin can view a private membership.
145+ a Launchpad admin can view a private team.
146 """
147 if self.obj.team.visibility == PersonVisibility.PUBLIC:
148 return True
149@@ -708,9 +708,9 @@
150
151
152 class ViewPublicOrPrivateTeamMembers(AuthorizationBase):
153- """Restrict viewing of private memberships of teams.
154+ """Restrict viewing of private teams.
155
156- Only members of a team with a private membership can view the
157+ Only members of a private team can view the
158 membership list.
159 """
160 permission = 'launchpad.View'
161@@ -726,7 +726,7 @@
162 """Verify that the user can view the team's membership.
163
164 Anyone can see a public team's membership. Only a team member
165- or a Launchpad admin can view a private membership.
166+ or a Launchpad admin can view a private team's members.
167 """
168 if self.obj.visibility == PersonVisibility.PUBLIC:
169 return True
170@@ -2068,8 +2068,7 @@
171 class ViewArchive(AuthorizationBase):
172 """Restrict viewing of private archives.
173
174- Only admins or members of a team with a private membership can
175- view the archive.
176+ Only admins or members of a private team can view the archive.
177 """
178 permission = 'launchpad.View'
179 usedfor = IArchive
180
181=== modified file 'lib/lp/bugs/browser/bugtask.py'
182--- lib/lp/bugs/browser/bugtask.py 2010-07-15 07:39:09 +0000
183+++ lib/lp/bugs/browser/bugtask.py 2010-07-29 20:21:16 +0000
184@@ -88,7 +88,7 @@
185 from canonical.database.sqlbase import cursor
186 from canonical.launchpad import _
187 from canonical.cachedproperty import cachedproperty
188-from canonical.launchpad.fields import ParticipatingPersonChoice
189+from canonical.launchpad.fields import PersonChoice
190 from canonical.launchpad.mailnotification import get_unified_diff
191 from canonical.launchpad.validators import LaunchpadValidationError
192 from canonical.launchpad.webapp import (
193@@ -205,6 +205,7 @@
194 title = title[3:]
195 return title.strip()
196
197+
198 def get_comments_for_bugtask(bugtask, truncate=False):
199 """Return BugComments related to a bugtask.
200
201@@ -218,7 +219,7 @@
202 message_id = attachment.message.id
203 # All attachments are related to a message, so we can be
204 # sure that the BugComment is already created.
205- assert comments.has_key(message_id), message_id
206+ assert message_id in comments, message_id
207 if attachment.type == BugAttachmentType.PATCH:
208 comments[message_id].patches.append(attachment)
209 else:
210@@ -1112,8 +1113,8 @@
211 """Return the list of available official tags for the bug as JSON.
212
213 The list comprises of the official tags for all targets for which the
214- bug has a task. It is returned as Javascript snippet, to be ambedded in
215- the bug page.
216+ bug has a task. It is returned as Javascript snippet, to be embedded
217+ in the bug page.
218 """
219 available_tags = set()
220 for task in self.context.bug.bugtasks:
221@@ -1502,7 +1503,7 @@
222 self.form_fields.get('assignee', False)):
223 # Make the assignee field editable
224 self.form_fields = self.form_fields.omit('assignee')
225- self.form_fields += formlib.form.Fields(ParticipatingPersonChoice(
226+ self.form_fields += formlib.form.Fields(PersonChoice(
227 __name__='assignee', title=_('Assigned to'), required=False,
228 vocabulary=get_assignee_vocabulary(self.context),
229 readonly=False))
230
231=== modified file 'lib/lp/bugs/interfaces/bugsubscription.py'
232--- lib/lp/bugs/interfaces/bugsubscription.py 2010-03-22 23:02:50 +0000
233+++ lib/lp/bugs/interfaces/bugsubscription.py 2010-07-29 20:21:16 +0000
234@@ -14,7 +14,7 @@
235 from zope.interface import Interface, Attribute
236 from zope.schema import Int, Datetime
237 from canonical.launchpad import _
238-from canonical.launchpad.fields import ParticipatingPersonChoice
239+from canonical.launchpad.fields import PersonChoice
240 from lp.bugs.interfaces.bug import IBug
241
242 from lazr.restful.declarations import (
243@@ -22,13 +22,14 @@
244 export_read_operation, exported)
245 from lazr.restful.fields import Reference
246
247+
248 class IBugSubscription(Interface):
249 """The relationship between a person and a bug."""
250
251 export_as_webservice_entry()
252
253 id = Int(title=_('ID'), readonly=True, required=True)
254- person = exported(ParticipatingPersonChoice(
255+ person = exported(PersonChoice(
256 title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',
257 readonly=True, description=_("The person's Launchpad ID or "
258 "e-mail address.")))
259@@ -36,7 +37,7 @@
260 IBug, title=_("Bug"), required=True, readonly=True))
261 date_created = exported(
262 Datetime(title=_('Date subscribed'), required=True, readonly=True))
263- subscribed_by = exported(ParticipatingPersonChoice(
264+ subscribed_by = exported(PersonChoice(
265 title=_('Subscribed by'), required=True,
266 vocabulary='ValidPersonOrTeam', readonly=True,
267 description=_("The person who created this subscription.")))
268
269=== modified file 'lib/lp/bugs/interfaces/bugsupervisor.py'
270--- lib/lp/bugs/interfaces/bugsupervisor.py 2010-06-16 17:55:37 +0000
271+++ lib/lp/bugs/interfaces/bugsupervisor.py 2010-07-29 20:21:16 +0000
272@@ -12,7 +12,7 @@
273 ]
274
275 from canonical.launchpad import _
276-from canonical.launchpad.fields import ParticipatingPersonChoice
277+from canonical.launchpad.fields import PersonChoice
278
279 from zope.interface import Interface
280
281@@ -24,7 +24,7 @@
282
283 class IHasBugSupervisor(Interface):
284
285- bug_supervisor = exported(ParticipatingPersonChoice(
286+ bug_supervisor = exported(PersonChoice(
287 title=_("Bug Supervisor"),
288 description=_(
289 "The Launchpad id of the person or team (preferred) responsible "
290
291=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
292--- lib/lp/bugs/interfaces/bugtask.py 2010-07-26 12:49:23 +0000
293+++ lib/lp/bugs/interfaces/bugtask.py 2010-07-29 20:21:16 +0000
294@@ -57,7 +57,7 @@
295
296 from canonical.launchpad import _
297 from canonical.launchpad.fields import (
298- BugField, ParticipatingPersonChoice, ProductNameField, SearchTag,
299+ BugField, PersonChoice, ProductNameField, SearchTag,
300 StrippedTextLine, Summary)
301 from lp.bugs.interfaces.bugwatch import (
302 IBugWatch, IBugWatchSet, NoBugTrackerFound, UnrecognizedBugTrackerURL)
303@@ -437,7 +437,7 @@
304 statusexplanation = Text(
305 title=_("Status notes (optional)"), required=False)
306 assignee = exported(
307- ParticipatingPersonChoice(
308+ PersonChoice(
309 title=_('Assigned to'), required=False,
310 vocabulary='ValidAssignee',
311 readonly=True))
312
313=== modified file 'lib/lp/bugs/model/bugactivity.py'
314--- lib/lp/bugs/model/bugactivity.py 2009-06-25 00:40:31 +0000
315+++ lib/lp/bugs/model/bugactivity.py 2010-07-29 20:21:16 +0000
316@@ -14,8 +14,7 @@
317 from lp.bugs.interfaces.bugactivity import IBugActivity, IBugActivitySet
318 from canonical.database.sqlbase import SQLBase
319 from canonical.database.datetimecol import UtcDateTimeCol
320-from lp.registry.interfaces.person import (
321- validate_person_not_private_membership)
322+from lp.registry.interfaces.person import validate_person
323
324
325 class BugActivity(SQLBase):
326@@ -28,7 +27,7 @@
327 datechanged = UtcDateTimeCol(notNull=True)
328 person = ForeignKey(
329 dbName='person', foreignKey='Person',
330- storm_validator=validate_person_not_private_membership,
331+ storm_validator=validate_person,
332 notNull=True)
333 whatchanged = StringCol(notNull=True)
334 oldvalue = StringCol(default=None)
335
336=== modified file 'lib/lp/bugs/model/bugsubscription.py'
337--- lib/lp/bugs/model/bugsubscription.py 2010-03-22 23:02:50 +0000
338+++ lib/lp/bugs/model/bugsubscription.py 2010-07-29 20:21:16 +0000
339@@ -15,8 +15,7 @@
340 from canonical.database.sqlbase import SQLBase
341
342 from lp.bugs.interfaces.bugsubscription import IBugSubscription
343-from lp.registry.interfaces.person import (
344- validate_person_not_private_membership)
345+from lp.registry.interfaces.person import validate_person
346
347
348 class BugSubscription(SQLBase):
349@@ -28,14 +27,14 @@
350
351 person = ForeignKey(
352 dbName='person', foreignKey='Person',
353- storm_validator=validate_person_not_private_membership,
354+ storm_validator=validate_person,
355 notNull=True
356 )
357 bug = ForeignKey(dbName='bug', foreignKey='Bug', notNull=True)
358 date_created = UtcDateTimeCol(notNull=True, default=UTC_NOW)
359 subscribed_by = ForeignKey(
360 dbName='subscribed_by', foreignKey='Person',
361- storm_validator=validate_person_not_private_membership,
362+ storm_validator=validate_person,
363 notNull=True
364 )
365
366
367=== modified file 'lib/lp/bugs/model/bugtask.py'
368--- lib/lp/bugs/model/bugtask.py 2010-07-21 08:15:49 +0000
369+++ lib/lp/bugs/model/bugtask.py 2010-07-29 20:21:16 +0000
370@@ -88,8 +88,7 @@
371 from canonical.launchpad.searchbuilder import (
372 all, any, greater_than, NULL, not_equals)
373 from lp.registry.interfaces.person import (
374- IPerson, validate_person_not_private_membership,
375- validate_public_person)
376+ IPerson, validate_person, validate_public_person)
377 from canonical.launchpad.webapp.interfaces import (
378 IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE, SLAVE_FLAVOR, NotFoundError)
379
380@@ -454,8 +453,8 @@
381
382 def validate_assignee(self, attr, value):
383 value = validate_conjoined_attribute(self, attr, value)
384- # Check if this assignee is public.
385- return validate_person_not_private_membership(self, attr, value)
386+ # Check if this person is valid and not None.
387+ return validate_person(self, attr, value)
388
389
390 @block_implicit_flushes
391@@ -772,7 +771,7 @@
392 # If nothing else, this is a distro task.
393 alsoProvides(self, IDistroBugTask)
394 else:
395- raise AssertionError, "Task %d is floating." % self.id
396+ raise AssertionError("Task %d is floating." % self.id)
397
398 @property
399 def target_uses_malone(self):
400@@ -1646,41 +1645,41 @@
401 structural_subscriber_clause = ( """BugTask.id IN (
402 SELECT BugTask.id FROM BugTask, StructuralSubscription
403 WHERE BugTask.product = StructuralSubscription.product
404- AND StructuralSubscription.subscriber = %(personid)s
405- UNION ALL
406- SELECT BugTask.id FROM BugTask, StructuralSubscription
407- WHERE
408- BugTask.distribution = StructuralSubscription.distribution
409- AND BugTask.sourcepackagename =
410- StructuralSubscription.sourcepackagename
411- AND StructuralSubscription.subscriber = %(personid)s
412- UNION ALL
413- SELECT BugTask.id FROM BugTask, StructuralSubscription
414- WHERE
415- BugTask.distroseries = StructuralSubscription.distroseries
416- AND StructuralSubscription.subscriber = %(personid)s
417- UNION ALL
418- SELECT BugTask.id FROM BugTask, StructuralSubscription
419- WHERE
420- BugTask.milestone = StructuralSubscription.milestone
421- AND StructuralSubscription.subscriber = %(personid)s
422- UNION ALL
423- SELECT BugTask.id FROM BugTask, StructuralSubscription
424- WHERE
425- BugTask.productseries = StructuralSubscription.productseries
426- AND StructuralSubscription.subscriber = %(personid)s
427+ AND StructuralSubscription.subscriber = %(personid)s
428+ UNION ALL
429+ SELECT BugTask.id FROM BugTask, StructuralSubscription
430+ WHERE
431+ BugTask.distribution = StructuralSubscription.distribution
432+ AND BugTask.sourcepackagename =
433+ StructuralSubscription.sourcepackagename
434+ AND StructuralSubscription.subscriber = %(personid)s
435+ UNION ALL
436+ SELECT BugTask.id FROM BugTask, StructuralSubscription
437+ WHERE
438+ BugTask.distroseries = StructuralSubscription.distroseries
439+ AND StructuralSubscription.subscriber = %(personid)s
440+ UNION ALL
441+ SELECT BugTask.id FROM BugTask, StructuralSubscription
442+ WHERE
443+ BugTask.milestone = StructuralSubscription.milestone
444+ AND StructuralSubscription.subscriber = %(personid)s
445+ UNION ALL
446+ SELECT BugTask.id FROM BugTask, StructuralSubscription
447+ WHERE
448+ BugTask.productseries = StructuralSubscription.productseries
449+ AND StructuralSubscription.subscriber = %(personid)s
450 UNION ALL
451 SELECT BugTask.id FROM BugTask, StructuralSubscription, Product
452 WHERE
453- BugTask.product = Product.id
454- AND Product.project = StructuralSubscription.project
455- AND StructuralSubscription.subscriber = %(personid)s
456+ BugTask.product = Product.id
457+ AND Product.project = StructuralSubscription.project
458+ AND StructuralSubscription.subscriber = %(personid)s
459 UNION ALL
460 SELECT BugTask.id FROM BugTask, StructuralSubscription
461 WHERE
462- BugTask.distribution = StructuralSubscription.distribution
463- AND StructuralSubscription.sourcepackagename is NULL
464- AND StructuralSubscription.subscriber = %(personid)s)""" %
465+ BugTask.distribution = StructuralSubscription.distribution
466+ AND StructuralSubscription.sourcepackagename is NULL
467+ AND StructuralSubscription.subscriber = %(personid)s)""" %
468 sqlvalues(personid=params.structural_subscriber))
469 extra_clauses.append(structural_subscriber_clause)
470
471@@ -1744,7 +1743,8 @@
472 UNION ALL
473 SELECT BugTask.id
474 FROM BugTask, StructuralSubscription
475- WHERE BugTask.distribution = StructuralSubscription.distribution
476+ WHERE
477+ BugTask.distribution = StructuralSubscription.distribution
478 AND BugTask.sourcepackagename =
479 StructuralSubscription.sourcepackagename
480 AND StructuralSubscription.subscriber = %(bug_supervisor)s
481
482=== modified file 'lib/lp/code/interfaces/branch.py'
483--- lib/lp/code/interfaces/branch.py 2010-07-26 09:15:31 +0000
484+++ lib/lp/code/interfaces/branch.py 2010-07-29 20:21:16 +0000
485@@ -56,7 +56,7 @@
486
487 from canonical.launchpad import _
488 from canonical.launchpad.fields import (
489- ParticipatingPersonChoice, PublicPersonChoice, URIField, Whiteboard)
490+ PersonChoice, PublicPersonChoice, URIField, Whiteboard)
491 from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
492 from canonical.launchpad.validators import LaunchpadValidationError
493 from canonical.launchpad.webapp.interfaces import (
494@@ -361,7 +361,7 @@
495 vocabulary='ValidPersonOrTeam'))
496
497 owner = exported(
498- ParticipatingPersonChoice(
499+ PersonChoice(
500 title=_('Owner'),
501 required=True, readonly=True,
502 vocabulary='UserTeamsParticipationPlusSelf',
503
504=== modified file 'lib/lp/code/interfaces/branchsubscription.py'
505--- lib/lp/code/interfaces/branchsubscription.py 2010-05-28 04:18:17 +0000
506+++ lib/lp/code/interfaces/branchsubscription.py 2010-07-29 20:21:16 +0000
507@@ -19,7 +19,7 @@
508 BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel,
509 CodeReviewNotificationLevel)
510 from lp.code.interfaces.branch import IBranch
511-from canonical.launchpad.fields import ParticipatingPersonChoice
512+from canonical.launchpad.fields import PersonChoice
513 from lazr.restful.declarations import (
514 REQUEST_USER, call_with, export_as_webservice_entry,
515 export_read_operation, exported)
516@@ -32,7 +32,7 @@
517
518 id = Int(title=_('ID'), readonly=True, required=True)
519 person = exported(
520- ParticipatingPersonChoice(
521+ PersonChoice(
522 title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',
523 readonly=True, description=_('Enter the launchpad id, or email '
524 'address of the person you wish to subscribe to this branch. '
525@@ -75,7 +75,7 @@
526 'notifications.'
527 )))
528
529- subscribed_by = exported(ParticipatingPersonChoice(
530+ subscribed_by = exported(PersonChoice(
531 title=_('Subscribed by'), required=True,
532 vocabulary='ValidPersonOrTeam', readonly=True,
533 description=_("The person who created this subscription.")))
534
535=== modified file 'lib/lp/code/interfaces/branchvisibilitypolicy.py'
536--- lib/lp/code/interfaces/branchvisibilitypolicy.py 2010-04-16 15:06:55 +0000
537+++ lib/lp/code/interfaces/branchvisibilitypolicy.py 2010-07-29 20:21:16 +0000
538@@ -17,7 +17,7 @@
539 from zope.schema import Choice
540
541 from canonical.launchpad import _
542-from canonical.launchpad.fields import ParticipatingPersonChoice
543+from canonical.launchpad.fields import PersonChoice
544 from lp.code.enums import TeamBranchVisibilityRule
545
546
547@@ -89,7 +89,7 @@
548 The team may be null, in which case the rule applies to everyone.
549 """
550
551- team = ParticipatingPersonChoice(
552+ team = PersonChoice(
553 title=_('Team'), required=True, vocabulary='ValidPersonOrTeam',
554 description=_("Specifies the team that the policy applies to. "
555 "If None then the policy applies to everyone."))
556
557=== modified file 'lib/lp/code/interfaces/sourcepackagerecipe.py'
558--- lib/lp/code/interfaces/sourcepackagerecipe.py 2010-06-18 07:54:36 +0000
559+++ lib/lp/code/interfaces/sourcepackagerecipe.py 2010-07-29 20:21:16 +0000
560@@ -28,7 +28,7 @@
561
562 from canonical.launchpad import _
563 from canonical.launchpad.fields import (
564- ParticipatingPersonChoice, PublicPersonChoice
565+ PersonChoice, PublicPersonChoice
566 )
567 from canonical.launchpad.validators.name import name_validator
568
569@@ -84,7 +84,7 @@
570 vocabulary='ValidPersonOrTeam'))
571
572 owner = exported(
573- ParticipatingPersonChoice(
574+ PersonChoice(
575 title=_('Owner'),
576 required=True, readonly=False,
577 vocabulary='UserTeamsParticipationPlusSelf',
578
579=== modified file 'lib/lp/code/model/branch.py'
580--- lib/lp/code/model/branch.py 2010-07-29 08:06:07 +0000
581+++ lib/lp/code/model/branch.py 2010-07-29 20:21:16 +0000
582@@ -80,7 +80,7 @@
583 IFindOfficialBranchLinks)
584 from lp.codehosting.bzrutils import safe_open
585 from lp.registry.interfaces.person import (
586- validate_person_not_private_membership, validate_public_person)
587+ validate_person, validate_public_person)
588 from lp.services.database.prejoin import prejoin
589 from lp.services.job.interfaces.job import JobStatus
590 from lp.services.mail.notificationrecipientset import (
591@@ -127,7 +127,7 @@
592 storm_validator=validate_public_person, notNull=True)
593 owner = ForeignKey(
594 dbName='owner', foreignKey='Person',
595- storm_validator=validate_person_not_private_membership, notNull=True)
596+ storm_validator=validate_person, notNull=True)
597
598 def setOwner(self, new_owner, user):
599 """See `IBranch`."""
600
601=== modified file 'lib/lp/code/model/branchsubscription.py'
602--- lib/lp/code/model/branchsubscription.py 2010-05-28 04:18:17 +0000
603+++ lib/lp/code/model/branchsubscription.py 2010-07-29 20:21:16 +0000
604@@ -21,8 +21,7 @@
605 from lp.code.interfaces.branch import IBranchNavigationMenu
606 from lp.code.interfaces.branchtarget import IHasBranchTarget
607 from lp.code.security import BranchSubscriptionEdit
608-from lp.registry.interfaces.person import (
609- validate_person_not_private_membership)
610+from lp.registry.interfaces.person import validate_person
611
612
613 class BranchSubscription(SQLBase):
614@@ -34,7 +33,7 @@
615
616 person = ForeignKey(
617 dbName='person', foreignKey='Person',
618- storm_validator=validate_person_not_private_membership, notNull=True)
619+ storm_validator=validate_person, notNull=True)
620 branch = ForeignKey(dbName='branch', foreignKey='Branch', notNull=True)
621 notification_level = EnumCol(enum=BranchSubscriptionNotificationLevel,
622 notNull=True, default=DEFAULT)
623@@ -44,7 +43,7 @@
624 notNull=True, default=DEFAULT)
625 subscribed_by = ForeignKey(
626 dbName='subscribed_by', foreignKey='Person',
627- storm_validator=validate_person_not_private_membership, notNull=True)
628+ storm_validator=validate_person, notNull=True)
629
630 @property
631 def target(self):
632
633=== modified file 'lib/lp/code/model/branchvisibilitypolicy.py'
634--- lib/lp/code/model/branchvisibilitypolicy.py 2010-04-19 09:39:29 +0000
635+++ lib/lp/code/model/branchvisibilitypolicy.py 2010-07-29 20:21:16 +0000
636@@ -25,8 +25,7 @@
637 from lp.code.enums import BranchVisibilityRule
638 from lp.code.interfaces.branchvisibilitypolicy import (
639 IBranchVisibilityTeamPolicy, InvalidVisibilityPolicy)
640-from lp.registry.interfaces.person import (
641- validate_person_not_private_membership)
642+from lp.registry.interfaces.person import validate_person
643 from lp.registry.interfaces.product import IProduct
644 from lp.registry.interfaces.projectgroup import IProjectGroup
645
646@@ -41,7 +40,7 @@
647 product = ForeignKey(dbName='product', foreignKey='Product')
648 team = ForeignKey(
649 dbName='team', foreignKey='Person',
650- storm_validator=validate_person_not_private_membership,
651+ storm_validator=validate_person,
652 default=None)
653 rule = EnumCol(
654 dbName="policy", enum=BranchVisibilityRule, notNull=True,
655
656=== modified file 'lib/lp/registry/browser/person.py'
657--- lib/lp/registry/browser/person.py 2010-07-16 16:14:39 +0000
658+++ lib/lp/registry/browser/person.py 2010-07-29 20:21:16 +0000
659@@ -3326,8 +3326,6 @@
660 def visibility_info(self):
661 if self.context.visibility == PersonVisibility.PRIVATE:
662 return 'Private team'
663- elif self.context.visibility == PersonVisibility.PRIVATE_MEMBERSHIP:
664- return 'Team membership is viewable by team members'
665 else:
666 return 'Public team'
667
668@@ -3599,8 +3597,8 @@
669
670 def add_ssh(self):
671 sshkey = self.request.form.get('sshkey')
672- try:
673- getUtility(ISSHKeySet).new(self.user, sshkey)
674+ try:
675+ getUtility(ISSHKeySet).new(self.user, sshkey)
676 except SSHKeyAdditionError:
677 self.error_message = structured('Invalid public key')
678 except SSHKeyCompromisedError:
679@@ -4004,12 +4002,11 @@
680 and this team's visibility is either None or PUBLIC.
681 """
682 # Joining a moderated team will put you on the proposed_members
683- # list. If it is a private membership team, you are not allowed
684- # to view the proposed_members attribute until you are an
685- # active member; therefore, it would look like the join button
686- # is broken. Either private membership teams should always have a
687- # restricted subscription policy, or we need a more complicated
688- # permission model.
689+ # list. If it is a private team, you are not allowed to view the
690+ # proposed_members attribute until you are an active member;
691+ # therefore, it would look like the join button is broken. Either
692+ # private teams should always have a restricted subscription policy,
693+ # or we need a more complicated permission model.
694 if not (self.context.visibility is None
695 or self.context.visibility == PersonVisibility.PUBLIC):
696 return False
697
698=== modified file 'lib/lp/registry/browser/team.py'
699--- lib/lp/registry/browser/team.py 2010-07-16 16:14:39 +0000
700+++ lib/lp/registry/browser/team.py 2010-07-29 20:21:16 +0000
701@@ -166,28 +166,6 @@
702 """Remove the visibility field if not authorized."""
703 if not check_permission('launchpad.Commercial', self.context):
704 self.form_fields = self.form_fields.omit('visibility')
705- else:
706- # XXX: BradCrittenden 2010-07-12 bug=602773: This code can be
707- # removed when PRIVATE_MEMBERSHIP disappears fully.
708-
709- # Remove the visibility selector and replace with one with a more
710- # limited vocabulary.
711- terms = [SimpleTerm(PersonVisibility.PUBLIC,
712- PersonVisibility.PUBLIC.name,
713- PersonVisibility.PUBLIC.title),
714- SimpleTerm(PersonVisibility.PRIVATE,
715- PersonVisibility.PRIVATE.name,
716- PersonVisibility.PRIVATE.title),
717- ]
718- visibility = self.form_fields['visibility'].field
719- field = Choice(
720- __name__=visibility.getName(),
721- title=visibility.title,
722- source=SimpleVocabulary(terms))
723- self.form_fields = (
724- self.form_fields.omit('visibility') +
725- form.Fields(field))
726- self.form_fields = self.form_fields.select(*self.field_names)
727
728
729 class TeamEditView(TeamFormMixin, HasRenewalPolicyMixin,
730
731=== modified file 'lib/lp/registry/browser/tests/mailinglist-views.txt'
732--- lib/lp/registry/browser/tests/mailinglist-views.txt 2010-07-12 16:29:33 +0000
733+++ lib/lp/registry/browser/tests/mailinglist-views.txt 2010-07-29 20:21:16 +0000
734@@ -186,7 +186,7 @@
735 generates an Unauthorized exception which is turned into a NotFound in
736 publication so as to fool the wily hackers.
737
738- >>> # Create a private membership team.
739+ >>> # Create a private team.
740 >>> owner = person_set.getByEmail('owner@canonical.com')
741 >>> login('foo.bar@canonical.com')
742 >>> from lp.registry.interfaces.person import PersonVisibility
743
744=== modified file 'lib/lp/registry/doc/person.txt'
745--- lib/lp/registry/doc/person.txt 2010-07-16 13:34:38 +0000
746+++ lib/lp/registry/doc/person.txt 2010-07-29 20:21:16 +0000
747@@ -919,7 +919,7 @@
748 Warty Gnome Team (warty-gnome): []
749 Warty Security Team (name20): []
750
751-The Owner user is a member of the private membership team 'myteam' so
752+The Owner user is a member of the private team 'myteam' so
753 the previous search will include myteam in the results.
754
755 >>> login('owner@canonical.com')
756
757=== modified file 'lib/lp/registry/doc/private-team-roles.txt'
758--- lib/lp/registry/doc/private-team-roles.txt 2010-07-14 07:32:46 +0000
759+++ lib/lp/registry/doc/private-team-roles.txt 2010-07-29 20:21:16 +0000
760@@ -315,7 +315,7 @@
761 >>> private = PersonVisibility.PRIVATE
762
763 >>> visibility_list = list(PersonVisibility.items)
764- >>> visibility_list.remove(PersonVisibility.PRIVATE_MEMBERSHIP)
765+
766 >>> for joined in visibility_list:
767 ... for joiner in visibility_list:
768 ... join_team(joined, joiner)
769
770=== modified file 'lib/lp/registry/doc/private-team-visibility.txt'
771--- lib/lp/registry/doc/private-team-visibility.txt 2010-01-05 17:46:08 +0000
772+++ lib/lp/registry/doc/private-team-visibility.txt 2010-07-29 20:21:16 +0000
773@@ -2,9 +2,8 @@
774 Private team visibility
775 =========================
776
777-Private and private membership teams restrict the visibility of their
778-attributes to select sets of users in order to prevent leaking
779-confidential data.
780+Private teams restrict the visibility of their attributes to select
781+sets of users in order to prevent leaking confidential data.
782
783 Private teams restrict the viewing of the membership list
784 to team administrators, other members of the team, and Launchpad
785
786=== modified file 'lib/lp/registry/doc/vocabularies.txt'
787--- lib/lp/registry/doc/vocabularies.txt 2010-07-20 10:08:02 +0000
788+++ lib/lp/registry/doc/vocabularies.txt 2010-07-29 20:21:16 +0000
789@@ -769,7 +769,7 @@
790
791 Almost all teams have the word 'team' as part of their names, so a search
792 for 'team' should give us some of them. Notice that the
793-PRIVATE_MEMBERSHIP_TEAM 'myteam' is not included in the results.
794+PRIVATE_TEAM 'myteam' is not included in the results.
795
796 >>> login_person(sample_person)
797 >>> ephemeral = factory.makeTeam(owner=foo_bar, name='ephemeral-team')
798@@ -791,15 +791,6 @@
799 u'testing-spanish-team', u'ubuntu-security', u'ubuntu-team',
800 u'warty-gnome']
801
802-Logging in as 'owner', who is a member of myteam shows that the token
803-lookup still omits myteam.
804-
805- >>> login('owner@canonical.com')
806- >>> sorted(person.name for person in vocab.search('team'))
807- [u'hwdb-team', u'name18', u'name20', u'name21', u'no-team-memberships',
808- u'otherteam', u'simple-team', u'testing-spanish-team',
809- u'ubuntu-security', u'ubuntu-team', u'warty-gnome']
810-
811 A PRIVATE team is displayed when the logged in user is a member of the team.
812
813 >>> commercial = person_set.getByEmail('commercial-member@canonical.com')
814@@ -836,9 +827,10 @@
815
816 >>> login('owner@canonical.com')
817 >>> sorted(person.name for person in vocab.search('team'))
818- [u'hwdb-team', u'name18', u'name20', u'name21', u'no-team-memberships',
819- u'otherteam', u'simple-team', u'testing-spanish-team',
820- u'ubuntu-security', u'ubuntu-team', u'warty-gnome']
821+ [u'hwdb-team', u'myteam', u'name18', u'name20', u'name21',
822+ u'no-team-memberships', u'otherteam', u'simple-team',
823+ u'testing-spanish-team', u'ubuntu-security', u'ubuntu-team',
824+ u'warty-gnome']
825
826 The anonymous user will not see the private team either.
827
828
829=== modified file 'lib/lp/registry/interfaces/person.py'
830--- lib/lp/registry/interfaces/person.py 2010-07-16 21:55:55 +0000
831+++ lib/lp/registry/interfaces/person.py 2010-07-29 20:21:16 +0000
832@@ -37,7 +37,7 @@
833 'TeamContactMethod',
834 'TeamMembershipRenewalPolicy',
835 'TeamSubscriptionPolicy',
836- 'validate_person_not_private_membership',
837+ 'validate_person',
838 'validate_public_person',
839 ]
840
841@@ -67,7 +67,7 @@
842 from canonical.launchpad.fields import (
843 BlacklistableContentNameField, IconImageUpload, LogoImageUpload,
844 MugshotImageUpload, PasswordField, PersonChoice, PublicPersonChoice,
845- StrippedTextLine, is_private_membership_person, is_public_person)
846+ StrippedTextLine, is_public_person)
847 from canonical.launchpad.interfaces.account import AccountStatus, IAccount
848 from canonical.launchpad.interfaces.emailaddress import IEmailAddress
849 from canonical.launchpad.interfaces.launchpad import (
850@@ -110,7 +110,7 @@
851
852
853 @block_implicit_flushes
854-def validate_person(obj, attr, value, validate_func):
855+def validate_person_common(obj, attr, value, validate_func):
856 """Validate the person using the supplied function."""
857 if value is None:
858 return None
859@@ -121,7 +121,7 @@
860 # DB. This needs cleaning up.
861 from lp.registry.model.person import Person
862 person = Person.get(value)
863- if validate_func(person):
864+ if not validate_func(person):
865 raise PrivatePersonLinkageError(
866 "Cannot link person (name=%s, visibility=%s) to %s (name=%s)"
867 % (person.name, person.visibility.name,
868@@ -129,18 +129,20 @@
869 return value
870
871
872+def validate_person(obj, attr, value):
873+ """Validate the person is a real person with no other restrictions."""
874+ def validate(person):
875+ return IPerson.providedBy(person)
876+ return validate_person_common(obj, attr, value, validate)
877+
878+
879 def validate_public_person(obj, attr, value):
880 """Validate that the person identified by value is public."""
881
882 def validate(person):
883- return not is_public_person(person)
884-
885- return validate_person(obj, attr, value, validate)
886-
887-
888-def validate_person_not_private_membership(obj, attr, value):
889- """Validate that the person (value) is not a private membership team."""
890- return validate_person(obj, attr, value, is_private_membership_person)
891+ return is_public_person(person)
892+
893+ return validate_person_common(obj, attr, value, validate)
894
895
896 class PersonalStanding(DBEnumeratedType):
897@@ -378,14 +380,6 @@
898 Everyone can view all the attributes of this person.
899 """)
900
901- PRIVATE_MEMBERSHIP = DBItem(20, """
902- Private Membership
903-
904- Only Launchpad admins and team members can view the
905- membership list for this team. The team is severely restricted in the
906- roles it can assume.
907- """)
908-
909 PRIVATE = DBItem(30, """
910 Private
911
912
913=== modified file 'lib/lp/registry/interfaces/product.py'
914--- lib/lp/registry/interfaces/product.py 2010-07-09 10:22:32 +0000
915+++ lib/lp/registry/interfaces/product.py 2010-07-29 20:21:16 +0000
916@@ -36,7 +36,7 @@
917 from canonical.launchpad import _
918 from canonical.launchpad.fields import (
919 Description, IconImageUpload, LogoImageUpload, MugshotImageUpload,
920- ParticipatingPersonChoice, ProductBugTracker, ProductNameField,
921+ PersonChoice, ProductBugTracker, ProductNameField,
922 PublicPersonChoice, Summary, Title, URIField)
923 from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
924 from lp.bugs.interfaces.securitycontact import IHasSecurityContact
925@@ -373,7 +373,7 @@
926 exported_as='project_group')
927
928 owner = exported(
929- ParticipatingPersonChoice(
930+ PersonChoice(
931 title=_('Maintainer'),
932 required=True,
933 vocabulary='ValidOwner',
934@@ -390,7 +390,7 @@
935 "Launchpad.")))
936
937 driver = exported(
938- ParticipatingPersonChoice(
939+ PersonChoice(
940 title=_("Driver"),
941 description=_(
942 "This person or team will be able to set feature goals for "
943
944=== modified file 'lib/lp/registry/interfaces/productrelease.py'
945--- lib/lp/registry/interfaces/productrelease.py 2009-10-26 18:40:04 +0000
946+++ lib/lp/registry/interfaces/productrelease.py 2010-07-29 20:21:16 +0000
947@@ -28,7 +28,7 @@
948 from canonical.launchpad import _
949 from canonical.launchpad.validators.version import sane_version
950 from canonical.launchpad.fields import (
951- ContentNameField, ParticipatingPersonChoice)
952+ ContentNameField, PersonChoice)
953 from canonical.launchpad.validators import LaunchpadValidationError
954
955 from lazr.restful.fields import CollectionField, Reference, ReferenceChoice
956@@ -270,7 +270,7 @@
957 )
958
959 owner = exported(
960- ParticipatingPersonChoice(
961+ PersonChoice(
962 title=u"The owner of this release.",
963 required=True,
964 vocabulary='ValidOwner',
965@@ -357,6 +357,7 @@
966 Raises a NotFoundError if no matching ProductReleaseFile exists.
967 """
968
969+
970 class IProductRelease(IProductReleaseEditRestricted,
971 IProductReleasePublic):
972 """A specific release (i.e. version) of a product.
973@@ -366,6 +367,7 @@
974
975 export_as_webservice_entry('project_release')
976
977+
978 # Set the schema for IProductReleaseFile now that IProductRelease is defined.
979 IProductReleaseFile['productrelease'].schema = IProductRelease
980
981
982=== modified file 'lib/lp/registry/interfaces/productseries.py'
983--- lib/lp/registry/interfaces/productseries.py 2010-06-11 18:05:59 +0000
984+++ lib/lp/registry/interfaces/productseries.py 2010-07-29 20:21:16 +0000
985@@ -19,7 +19,7 @@
986 from zope.interface import Interface, Attribute
987
988 from canonical.launchpad.fields import (
989- ContentNameField, ParticipatingPersonChoice, Title)
990+ ContentNameField, PersonChoice, Title)
991 from lp.registry.interfaces.structuralsubscription import (
992 IStructuralSubscriptionTarget)
993 from lp.code.interfaces.branch import IBranch
994@@ -129,12 +129,12 @@
995 exported_as='date_created')
996
997 owner = exported(
998- ParticipatingPersonChoice(
999+ PersonChoice(
1000 title=_('Owner'), required=True, vocabulary='ValidOwner',
1001 description=_('Project owner, either a valid Person or Team')))
1002
1003 driver = exported(
1004- ParticipatingPersonChoice(
1005+ PersonChoice(
1006 title=_("Release manager"),
1007 description=_(
1008 "The person or team responsible for decisions about features "
1009
1010=== modified file 'lib/lp/registry/interfaces/structuralsubscription.py'
1011--- lib/lp/registry/interfaces/structuralsubscription.py 2010-04-19 08:11:52 +0000
1012+++ lib/lp/registry/interfaces/structuralsubscription.py 2010-07-29 20:21:16 +0000
1013@@ -23,7 +23,7 @@
1014
1015 from canonical.launchpad import _
1016 from canonical.launchpad.fields import (
1017- ParticipatingPersonChoice, PublicPersonChoice)
1018+ PersonChoice, PublicPersonChoice)
1019 from lp.registry.interfaces.person import IPerson
1020
1021 from lazr.restful.declarations import (
1022@@ -49,19 +49,23 @@
1023 LIFECYCLE = DBItem(20, """
1024 Lifecycle
1025
1026- Only send a low volume of notifications about new bugs registered, bugs removed or bug targetting.
1027+ Only send a low volume of notifications about new bugs registered,
1028+ bugs removed or bug targetting.
1029 """)
1030
1031 METADATA = DBItem(30, """
1032 Details
1033
1034- Send bug lifecycle notifications, as well as notifications about changes to the bug's details like status and description.
1035+ Send bug lifecycle notifications, as well as notifications about
1036+ changes to the bug's details like status and description.
1037 """)
1038
1039 COMMENTS = DBItem(40, """
1040 Discussion
1041
1042- Send bug lifecycle notifications, detail change notifications and notifications about new events in the bugs's discussion, like new comments.
1043+ Send bug lifecycle notifications, detail change notifications and
1044+ notifications about new events in the bugs's discussion, like new
1045+ comments.
1046 """)
1047
1048
1049@@ -80,13 +84,15 @@
1050 LIFECYCLE = DBItem(20, """
1051 Lifecycle
1052
1053- Only send a low volume of notifications about new blueprints registered, blueprints accepted or blueprint targetting.
1054+ Only send a low volume of notifications about new blueprints
1055+ registered, blueprints accepted or blueprint targetting.
1056 """)
1057
1058 METADATA = DBItem(30, """
1059 Details
1060
1061- Send blueprint lifecycle notifications, as well as notifications about changes to the blueprints's details like status and description.
1062+ Send blueprint lifecycle notifications, as well as notifications about
1063+ changes to the blueprints's details like status and description.
1064 """)
1065
1066
1067@@ -105,7 +111,7 @@
1068 title=_('Distribution series'), required=False, readonly=True)
1069 sourcepackagename = Int(
1070 title=_('Source package name'), required=False, readonly=True)
1071- subscriber = exported(ParticipatingPersonChoice(
1072+ subscriber = exported(PersonChoice(
1073 title=_('Subscriber'), required=True, vocabulary='ValidPersonOrTeam',
1074 readonly=True, description=_("The person subscribed.")))
1075 subscribed_by = exported(PublicPersonChoice(
1076
1077=== modified file 'lib/lp/registry/model/distribution.py'
1078--- lib/lp/registry/model/distribution.py 2010-06-29 10:17:06 +0000
1079+++ lib/lp/registry/model/distribution.py 2010-07-29 20:21:16 +0000
1080@@ -108,7 +108,7 @@
1081 from canonical.launchpad.validators.name import sanitize_name, valid_name
1082 from canonical.launchpad.webapp.interfaces import NotFoundError
1083 from lp.registry.interfaces.person import (
1084- validate_person_not_private_membership, validate_public_person)
1085+ validate_person, validate_public_person)
1086 from canonical.launchpad.webapp.url import urlparse
1087
1088 from lp.answers.model.question import (
1089@@ -152,7 +152,7 @@
1090 storm_validator=validate_public_person, notNull=True)
1091 bug_supervisor = ForeignKey(
1092 dbName='bug_supervisor', foreignKey='Person',
1093- storm_validator=validate_person_not_private_membership,
1094+ storm_validator=validate_person,
1095 notNull=False,
1096 default=None)
1097 bug_reporting_guidelines = StringCol(default=None)
1098@@ -774,7 +774,7 @@
1099
1100 def getSeriesByStatus(self, status):
1101 """See `IDistribution`."""
1102- return Store.of(self).find(DistroSeries,
1103+ return Store.of(self).find(DistroSeries,
1104 DistroSeries.distribution == self,
1105 DistroSeries.status == status)
1106
1107
1108=== modified file 'lib/lp/registry/model/person.py'
1109--- lib/lp/registry/model/person.py 2010-07-24 00:39:29 +0000
1110+++ lib/lp/registry/model/person.py 2010-07-29 20:21:16 +0000
1111@@ -191,17 +191,10 @@
1112 def validate_person_visibility(person, attr, value):
1113 """Validate changes in visibility.
1114
1115- * Prevent teams with inconsistent connections from being made private
1116- * Prevent private membership teams with mailing lists from going public.
1117+ * Prevent teams with inconsistent connections from being made private.
1118 * Prevent private teams from any transition.
1119 """
1120
1121- # XXX: BradCrittenden 2010-07-12 bug=602773: Private membership teams are
1122- # deprecated and new ones may not be created.
1123- if value == PersonVisibility.PRIVATE_MEMBERSHIP:
1124- raise AssertionError(
1125- "Private membership teams are deprecated.")
1126-
1127 # Prohibit any visibility changes for private teams. This rule is
1128 # recognized to be Draconian and may be relaxed in the future.
1129 if person.visibility == PersonVisibility.PRIVATE:
1130
1131=== modified file 'lib/lp/registry/model/product.py'
1132--- lib/lp/registry/model/product.py 2010-07-09 10:22:32 +0000
1133+++ lib/lp/registry/model/product.py 2010-07-29 20:21:16 +0000
1134@@ -58,7 +58,7 @@
1135 from lp.registry.model.milestone import (
1136 HasMilestonesMixin, Milestone)
1137 from lp.registry.interfaces.person import (
1138- validate_person_not_private_membership, validate_public_person)
1139+ validate_person, validate_public_person)
1140 from lp.registry.model.announcement import MakesAnnouncements
1141 from lp.registry.model.packaging import Packaging
1142 from lp.registry.model.pillar import HasAliasMixin
1143@@ -78,10 +78,8 @@
1144 HasTranslationImportsMixin)
1145 from lp.registry.model.structuralsubscription import (
1146 StructuralSubscriptionTargetMixin)
1147-from canonical.launchpad.helpers import shortlist
1148
1149-from lp.code.interfaces.branch import (
1150- DEFAULT_BRANCH_STATUS_IN_LISTING, IBranchSet)
1151+from lp.code.interfaces.branch import DEFAULT_BRANCH_STATUS_IN_LISTING
1152 from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
1153 from canonical.launchpad.interfaces.launchpad import (
1154 IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage,
1155@@ -189,7 +187,7 @@
1156 default=None)
1157 _owner = ForeignKey(
1158 dbName="owner", foreignKey="Person",
1159- storm_validator=validate_person_not_private_membership,
1160+ storm_validator=validate_person,
1161 notNull=True)
1162 registrant = ForeignKey(
1163 dbName="registrant", foreignKey="Person",
1164@@ -197,7 +195,7 @@
1165 notNull=True)
1166 bug_supervisor = ForeignKey(
1167 dbName='bug_supervisor', foreignKey='Person',
1168- storm_validator=validate_person_not_private_membership,
1169+ storm_validator=validate_person,
1170 notNull=False,
1171 default=None)
1172 security_contact = ForeignKey(
1173@@ -206,7 +204,7 @@
1174 default=None)
1175 driver = ForeignKey(
1176 dbName="driver", foreignKey="Person",
1177- storm_validator=validate_person_not_private_membership,
1178+ storm_validator=validate_person,
1179 notNull=False, default=None)
1180 name = StringCol(
1181 dbName='name', notNull=True, alternateID=True, unique=True)
1182
1183=== modified file 'lib/lp/registry/model/productrelease.py'
1184--- lib/lp/registry/model/productrelease.py 2009-11-24 21:27:17 +0000
1185+++ lib/lp/registry/model/productrelease.py 2010-07-29 20:21:16 +0000
1186@@ -31,7 +31,7 @@
1187 UpstreamFileType)
1188 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
1189 from lp.registry.interfaces.person import (
1190- validate_person_not_private_membership, validate_public_person)
1191+ validate_person, validate_public_person)
1192 from canonical.launchpad.webapp.interfaces import (
1193 DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE)
1194
1195@@ -52,7 +52,7 @@
1196 dbName='datecreated', notNull=True, default=UTC_NOW)
1197 owner = ForeignKey(
1198 dbName="owner", foreignKey="Person",
1199- storm_validator=validate_person_not_private_membership,
1200+ storm_validator=validate_person,
1201 notNull=True)
1202 milestone = ForeignKey(dbName='milestone', foreignKey='Milestone')
1203
1204
1205=== modified file 'lib/lp/registry/model/productseries.py'
1206--- lib/lp/registry/model/productseries.py 2010-07-24 11:31:11 +0000
1207+++ lib/lp/registry/model/productseries.py 2010-07-29 20:21:16 +0000
1208@@ -35,8 +35,7 @@
1209 from lp.registry.model.milestone import (
1210 HasMilestonesMixin, Milestone)
1211 from lp.registry.model.packaging import Packaging
1212-from lp.registry.interfaces.person import (
1213- validate_person_not_private_membership)
1214+from lp.registry.interfaces.person import validate_person
1215 from lp.translations.model.pofile import POFile
1216 from lp.translations.model.potemplate import (
1217 HasTranslationTemplatesMixin,
1218@@ -95,12 +94,12 @@
1219 datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)
1220 owner = ForeignKey(
1221 dbName="owner", foreignKey="Person",
1222- storm_validator=validate_person_not_private_membership,
1223+ storm_validator=validate_person,
1224 notNull=True)
1225
1226 driver = ForeignKey(
1227 dbName="driver", foreignKey="Person",
1228- storm_validator=validate_person_not_private_membership,
1229+ storm_validator=validate_person,
1230 notNull=False, default=None)
1231 branch = ForeignKey(foreignKey='Branch', dbName='branch',
1232 default=None)
1233
1234=== modified file 'lib/lp/registry/model/structuralsubscription.py'
1235--- lib/lp/registry/model/structuralsubscription.py 2010-04-19 09:39:29 +0000
1236+++ lib/lp/registry/model/structuralsubscription.py 2010-07-29 20:21:16 +0000
1237@@ -29,7 +29,7 @@
1238 IStructuralSubscription, IStructuralSubscriptionTarget,
1239 UserCannotSubscribePerson)
1240 from lp.registry.interfaces.person import (
1241- validate_public_person, validate_person_not_private_membership)
1242+ validate_person, validate_public_person)
1243
1244
1245 class StructuralSubscription(SQLBase):
1246@@ -61,7 +61,7 @@
1247 notNull=False, default=None)
1248 subscriber = ForeignKey(
1249 dbName='subscriber', foreignKey='Person',
1250- storm_validator=validate_person_not_private_membership, notNull=True)
1251+ storm_validator=validate_person, notNull=True)
1252 subscribed_by = ForeignKey(
1253 dbName='subscribed_by', foreignKey='Person',
1254 storm_validator=validate_public_person, notNull=True)
1255@@ -105,11 +105,12 @@
1256 elif self.distroseries is not None:
1257 return self.distroseries
1258 else:
1259- raise AssertionError, 'StructuralSubscription has no target.'
1260+ raise AssertionError('StructuralSubscription has no target.')
1261
1262
1263 class StructuralSubscriptionTargetMixin:
1264 """Mixin class for implementing `IStructuralSubscriptionTarget`."""
1265+
1266 @property
1267 def _target_args(self):
1268 """Target Arguments.
1269
1270=== modified file 'lib/lp/registry/tests/mailinglists_helper.py'
1271--- lib/lp/registry/tests/mailinglists_helper.py 2009-12-04 17:16:39 +0000
1272+++ lib/lp/registry/tests/mailinglists_helper.py 2010-07-29 20:21:16 +0000
1273@@ -1,4 +1,4 @@
1274-# Copyright 2009 Canonical Ltd. This software is licensed under the
1275+# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
1276 # GNU Affero General Public License version 3 (see the file LICENSE).
1277
1278 """Helper functions for testing XML-RPC services."""
1279@@ -45,6 +45,7 @@
1280 used which prints faults to match the output of ServerProxy (proper
1281 exceptions aren't really necessary).
1282 """
1283+
1284 def caller(self, *args, **kws):
1285 result = func(self, *args, **kws)
1286 if isinstance(result, xmlrpclib.Fault):
1287@@ -194,7 +195,7 @@
1288 browser.getControl(name='field.name').value = team_name
1289 browser.getControl('Display Name').value = displayname
1290 if private:
1291- browser.getControl('Visibility').value = ['PRIVATE_MEMBERSHIP']
1292+ browser.getControl('Visibility').value = ['PRIVATE']
1293 browser.getControl(name='field.subscriptionpolicy').value = [
1294 'RESTRICTED']
1295 else:
1296
1297=== modified file 'lib/lp/registry/tests/test_person.py'
1298--- lib/lp/registry/tests/test_person.py 2010-07-14 16:08:24 +0000
1299+++ lib/lp/registry/tests/test_person.py 2010-07-29 20:21:16 +0000
1300@@ -26,7 +26,7 @@
1301 from lp.registry.interfaces.person import (
1302 IPersonSet, ImmutableVisibilityError, NameAlreadyTaken,
1303 PersonCreationRationale, PersonVisibility)
1304-from canonical.launchpad.database import Bug, BugTask, BugSubscription
1305+from canonical.launchpad.database import Bug
1306 from lp.registry.model.structuralsubscription import (
1307 StructuralSubscription)
1308 from lp.registry.model.karma import KarmaCategory
1309@@ -115,19 +115,6 @@
1310 PrivatePersonLinkageError,
1311 setattr, bug, attr_name, self.myteam)
1312
1313- def test_BugTask_person_validator(self):
1314- bug_task = BugTask.select(limit=1)[0]
1315- for attr_name in ['assignee', 'owner']:
1316- self.assertRaises(
1317- PrivatePersonLinkageError,
1318- setattr, bug_task, attr_name, self.myteam)
1319-
1320- def test_BugSubscription_person_validator(self):
1321- bug_subscription = BugSubscription.select(limit=1)[0]
1322- self.assertRaises(
1323- PrivatePersonLinkageError,
1324- setattr, bug_subscription, 'person', self.myteam)
1325-
1326 def test_Specification_person_validator(self):
1327 specification = Specification.select(limit=1)[0]
1328 for attr_name in ['assignee', 'drafter', 'approver', 'owner',
1329
1330=== modified file 'lib/lp/registry/tests/test_user_vocabularies.py'
1331--- lib/lp/registry/tests/test_user_vocabularies.py 2010-07-14 14:35:59 +0000
1332+++ lib/lp/registry/tests/test_user_vocabularies.py 2010-07-29 20:21:16 +0000
1333@@ -127,7 +127,7 @@
1334 login_person(team_owner)
1335 team = self.factory.makeTeam(owner=team_owner)
1336 team.addMember(person=user, reviewer=team_owner)
1337- # Launchpad admin rights are needed to set private membership.
1338+ # Launchpad admin rights are needed to create private teams.
1339 login('foo.bar@canonical.com')
1340 team.visibility = PersonVisibility.PRIVATE
1341 login_person(user)
1342
1343=== modified file 'lib/lp/registry/vocabularies.py'
1344--- lib/lp/registry/vocabularies.py 2010-06-04 09:31:21 +0000
1345+++ lib/lp/registry/vocabularies.py 2010-07-29 20:21:16 +0000
1346@@ -1,4 +1,4 @@
1347-# Copyright 2009 Canonical Ltd. This software is licensed under the
1348+# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
1349 # GNU Affero General Public License version 3 (see the file LICENSE).
1350
1351 """Vocabularies for content objects.
1352@@ -441,9 +441,7 @@
1353 # visible.
1354 private_query = AND(
1355 Not(Person.teamowner == None),
1356- OR(
1357- Person.visibility == PersonVisibility.PRIVATE,
1358- Person.visibility == PersonVisibility.PRIVATE_MEMBERSHIP))
1359+ Person.visibility == PersonVisibility.PRIVATE)
1360 else:
1361 private_query = AND(
1362 TeamParticipation.person == logged_in_user.id,
1363
1364=== modified file 'lib/lp/soyuz/browser/archive.py'
1365--- lib/lp/soyuz/browser/archive.py 2010-07-20 10:25:51 +0000
1366+++ lib/lp/soyuz/browser/archive.py 2010-07-29 20:21:16 +0000
1367@@ -1,4 +1,4 @@
1368-# Copyright 2009 Canonical Ltd. This software is licensed under the
1369+# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
1370 # GNU Affero General Public License version 3 (see the file LICENSE).
1371
1372 """Browser views for archive."""
1373@@ -292,6 +292,7 @@
1374 user.item
1375 where item is a component or a source package name,
1376 """
1377+
1378 def get_url_param(param_name):
1379 """Return the URL parameter with the given name or None."""
1380 param_seq = self.request.query_string_params.get(param_name)
1381@@ -371,6 +372,7 @@
1382
1383
1384 class ArchiveMenuMixin:
1385+
1386 def ppa(self):
1387 text = 'View PPA'
1388 return Link(canonical_url(self.context), text, icon='info')
1389@@ -522,6 +524,7 @@
1390 @cachedproperty
1391 def repository_usage(self):
1392 """Return a dictionary with usage details of this repository."""
1393+
1394 def package_plural(control):
1395 if control == 1:
1396 return 'package'
1397@@ -629,7 +632,6 @@
1398 IPackageCopyRequestSet).getByTargetArchive(self.context)
1399 return list(copy_requests)
1400
1401-
1402 @property
1403 def disabled_warning_message(self):
1404 """Return an appropriate message if the archive is disabled."""
1405@@ -737,7 +739,7 @@
1406 # If the request included a filter, try to use it - if it's
1407 # invalid we use the default instead.
1408 vocab = self.widgets[filter_name].vocabulary
1409- if vocab.by_token.has_key(requested_filter[0]):
1410+ if requested_filter[0] in vocab.by_token:
1411 return vocab.getTermByToken(requested_filter[0]).value
1412 else:
1413 return getattr(self, default_filter_attr)
1414@@ -1160,6 +1162,7 @@
1415
1416 self.setNextURL()
1417
1418+
1419 class DestinationArchiveDropdownWidget(LaunchpadDropdownWidget):
1420 """Redefining default display value as 'This PPA'."""
1421 _messageNoValue = _("vocabulary-copy-to-context-ppa", "This PPA")
1422@@ -1809,8 +1812,7 @@
1423 def is_private_team(self):
1424 """Is the person a private team?
1425
1426- :return: True only if visibility is PRIVATE. False is returned when
1427- the visibility is PUBLIC and PRIVATE_MEMBERSHIP.
1428+ :return: True only if visibility is PRIVATE.
1429 :rtype: bool
1430 """
1431 return self.context.visibility == PersonVisibility.PRIVATE
1432@@ -1861,6 +1863,7 @@
1433 """Default save validation does nothing."""
1434 pass
1435
1436+
1437 class ArchiveEditView(BaseArchiveEditView):
1438
1439 field_names = ['displayname', 'description', 'enabled', 'publish']
1440@@ -1881,7 +1884,7 @@
1441 def updateContextFromData(self, data):
1442 """Update context from form data.
1443
1444- If the user did not specify a buildd secret but marked the
1445+ If the user did not specify a buildd secret but marked the
1446 archive as private, generate a secret for them.
1447 """
1448 if data['private'] and data['buildd_secret'] is None:
1449@@ -1958,8 +1961,7 @@
1450 def owner_is_private_team(self):
1451 """Is the owner a private team?
1452
1453- :return: True only if visibility is PRIVATE. False is returned when
1454- the visibility is PUBLIC and PRIVATE_MEMBERSHIP.
1455+ :return: True only if visibility is PRIVATE.
1456 :rtype: bool
1457 """
1458 return self.context.owner.visibility == PersonVisibility.PRIVATE
1459@@ -2028,4 +2030,3 @@
1460 self.request.response.addInfoNotification(
1461 "Deletion of '%s' has been requested and the repository will be "
1462 "removed shortly." % self.context.title)
1463-
1464
1465=== modified file 'lib/lp/soyuz/browser/archivesubscription.py'
1466--- lib/lp/soyuz/browser/archivesubscription.py 2010-03-08 18:01:33 +0000
1467+++ lib/lp/soyuz/browser/archivesubscription.py 2010-07-29 20:21:16 +0000
1468@@ -11,7 +11,7 @@
1469 'ArchiveSubscribersView',
1470 'PersonArchiveSubscriptionView',
1471 'PersonArchiveSubscriptionsView',
1472- 'traverse_archive_subscription_for_subscriber'
1473+ 'traverse_archive_subscription_for_subscriber',
1474 ]
1475
1476 import datetime
1477@@ -27,7 +27,7 @@
1478
1479 from canonical.cachedproperty import cachedproperty
1480 from canonical.launchpad import _
1481-from canonical.launchpad.fields import ParticipatingPersonChoice
1482+from canonical.launchpad.fields import PersonChoice
1483 from lp.soyuz.browser.sourceslist import (
1484 SourcesListEntries, SourcesListEntriesView)
1485 from lp.soyuz.interfaces.archive import IArchiveSet
1486@@ -93,7 +93,7 @@
1487 we simply want to use a date field when users create or edit new
1488 subscriptions.
1489 """
1490- subscriber = ParticipatingPersonChoice(
1491+ subscriber = PersonChoice(
1492 title=_("Subscriber"), required=True, vocabulary='ValidPersonOrTeam',
1493 description=_("The person or team to grant access."))
1494
1495@@ -383,6 +383,3 @@
1496 token_set = getUtility(IArchiveAuthTokenSet)
1497 return token_set.getActiveTokenForArchiveAndPerson(
1498 self.context.archive, self.context.subscriber)
1499-
1500-
1501-
1502
1503=== modified file 'lib/lp/soyuz/interfaces/archive.py'
1504--- lib/lp/soyuz/interfaces/archive.py 2010-07-27 12:28:46 +0000
1505+++ lib/lp/soyuz/interfaces/archive.py 2010-07-29 20:21:16 +0000
1506@@ -53,7 +53,7 @@
1507
1508 from canonical.launchpad import _
1509 from canonical.launchpad.fields import (
1510- ParticipatingPersonChoice, PublicPersonChoice, StrippedTextLine)
1511+ PersonChoice, PublicPersonChoice, StrippedTextLine)
1512 from canonical.launchpad.interfaces.launchpad import IPrivacy
1513 from lp.registry.interfaces.role import IHasOwner
1514 from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
1515@@ -227,7 +227,7 @@
1516 id = Attribute("The archive ID.")
1517
1518 owner = exported(
1519- ParticipatingPersonChoice(
1520+ PersonChoice(
1521 title=_('Owner'), required=True, vocabulary='ValidOwner',
1522 description=_("""The archive owner.""")))
1523
1524@@ -567,17 +567,18 @@
1525 distroseries, strict_component=True):
1526 """Can 'person' upload 'sourcepackagename' to this archive ?
1527
1528- :param person: The `IPerson` trying to upload to the package. Referred to
1529- as 'the signer' in upload code.
1530- :param sourcepackagename: The source package being uploaded. None if the
1531- package is new.
1532+ :param person: The `IPerson` trying to upload to the package. Referred
1533+ to as 'the signer' in upload code.
1534+ :param sourcepackagename: The source package being uploaded. None if
1535+ the package is new.
1536 :param archive: The `IArchive` being uploaded to.
1537 :param component: The `IComponent` that the source package belongs to.
1538 :param distroseries: The upload's target distro series.
1539- :param strict_component: True if access to the specific component for the
1540- package is needed to upload to it. If False, then access to any
1541- package will do.
1542- :return: CannotUploadToArchive if 'person' cannot upload to the archive,
1543+ :param strict_component: True if access to the specific component for
1544+ the package is needed to upload to it. If False, then access to
1545+ any package will do.
1546+ :return: CannotUploadToArchive if 'person' cannot upload to the
1547+ archive,
1548 None otherwise.
1549 """
1550
1551
1552=== modified file 'lib/lp/soyuz/interfaces/archivesubscriber.py'
1553--- lib/lp/soyuz/interfaces/archivesubscriber.py 2009-09-11 10:52:54 +0000
1554+++ lib/lp/soyuz/interfaces/archivesubscriber.py 2010-07-29 20:21:16 +0000
1555@@ -20,7 +20,7 @@
1556 from lazr.enum import DBEnumeratedType, DBItem
1557
1558 from canonical.launchpad import _
1559-from canonical.launchpad.fields import ParticipatingPersonChoice
1560+from canonical.launchpad.fields import PersonChoice
1561 from lp.soyuz.interfaces.archive import IArchive
1562 from lp.registry.interfaces.person import IPerson
1563 from lazr.restful.declarations import export_as_webservice_entry, exported
1564@@ -71,7 +71,7 @@
1565 title=_("Date Created"), required=True, readonly=True,
1566 description=_("The timestamp when the subscription was created.")))
1567
1568- subscriber = exported(ParticipatingPersonChoice(
1569+ subscriber = exported(PersonChoice(
1570 title=_("Subscriber"), required=True, readonly=True,
1571 vocabulary='ValidPersonOrTeam',
1572 description=_("The person who is subscribed.")))
1573
1574=== modified file 'lib/lp/soyuz/model/archive.py'
1575--- lib/lp/soyuz/model/archive.py 2010-07-27 12:53:24 +0000
1576+++ lib/lp/soyuz/model/archive.py 2010-07-29 20:21:16 +0000
1577@@ -102,8 +102,7 @@
1578 IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
1579 from canonical.launchpad.webapp.url import urlappend
1580 from canonical.launchpad.validators.name import valid_name
1581-from lp.registry.interfaces.person import (
1582- validate_person_not_private_membership)
1583+from lp.registry.interfaces.person import validate_person
1584
1585
1586 class Archive(SQLBase):
1587@@ -113,7 +112,7 @@
1588
1589 owner = ForeignKey(
1590 dbName='owner', foreignKey='Person',
1591- storm_validator=validate_person_not_private_membership, notNull=True)
1592+ storm_validator=validate_person, notNull=True)
1593
1594 def _validate_archive_name(self, attr, value):
1595 """Only allow renaming of COPY archives.
1596
1597=== modified file 'lib/lp/soyuz/model/archivesubscriber.py'
1598--- lib/lp/soyuz/model/archivesubscriber.py 2009-12-24 06:44:57 +0000
1599+++ lib/lp/soyuz/model/archivesubscriber.py 2010-07-29 20:21:16 +0000
1600@@ -22,8 +22,7 @@
1601 from canonical.database.enumcol import DBEnum
1602 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
1603 from lp.soyuz.model.archiveauthtoken import ArchiveAuthToken
1604-from lp.registry.interfaces.person import (
1605- validate_person_not_private_membership)
1606+from lp.registry.interfaces.person import validate_person
1607 from lp.registry.model.teammembership import TeamParticipation
1608 from lp.soyuz.interfaces.archivesubscriber import (
1609 ArchiveSubscriberStatus, IArchiveSubscriber)
1610@@ -47,7 +46,7 @@
1611
1612 subscriber_id = Int(
1613 name='subscriber', allow_none=False,
1614- validator=validate_person_not_private_membership)
1615+ validator=validate_person)
1616 subscriber = Reference(subscriber_id, 'Person.id')
1617
1618 date_expires = DateTime(
1619
1620=== modified file 'lib/lp/translations/interfaces/potemplate.py'
1621--- lib/lp/translations/interfaces/potemplate.py 2010-07-29 13:45:00 +0000
1622+++ lib/lp/translations/interfaces/potemplate.py 2010-07-29 20:21:16 +0000
1623@@ -12,7 +12,7 @@
1624 exported, export_as_webservice_entry, export_read_operation,
1625 operation_returns_collection_of)
1626
1627-from canonical.launchpad.fields import ParticipatingPersonChoice
1628+from canonical.launchpad.fields import PersonChoice
1629 from canonical.launchpad.interfaces.launchpad import NotFoundError
1630 from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
1631 from lp.registry.interfaces.distribution import IDistribution
1632@@ -124,7 +124,7 @@
1633 required=True,
1634 default=True), exported_as='active')
1635
1636- owner = exported(ParticipatingPersonChoice(
1637+ owner = exported(PersonChoice(
1638 title=_("Owner"),
1639 required=True,
1640 description=_(
1641
1642=== modified file 'lib/lp/translations/interfaces/translationimportqueue.py'
1643--- lib/lp/translations/interfaces/translationimportqueue.py 2010-06-04 07:29:20 +0000
1644+++ lib/lp/translations/interfaces/translationimportqueue.py 2010-07-29 20:21:16 +0000
1645@@ -12,7 +12,7 @@
1646 from lazr.enum import DBEnumeratedType, DBItem, EnumeratedType, Item
1647
1648 from canonical.launchpad import _
1649-from canonical.launchpad.fields import ParticipatingPersonChoice
1650+from canonical.launchpad.fields import PersonChoice
1651 from lp.registry.interfaces.sourcepackage import ISourcePackage
1652 from lp.translations.interfaces.translationfileformat import (
1653 TranslationFileFormat)
1654@@ -189,7 +189,7 @@
1655 required=True))
1656
1657 importer = exported(
1658- ParticipatingPersonChoice(
1659+ PersonChoice(
1660 title=_("Uploader"),
1661 required=True,
1662 readonly=True,
1663
1664=== modified file 'lib/lp/translations/model/translationimportqueue.py'
1665--- lib/lp/translations/model/translationimportqueue.py 2010-07-23 14:50:50 +0000
1666+++ lib/lp/translations/model/translationimportqueue.py 2010-07-29 20:21:16 +0000
1667@@ -40,7 +40,7 @@
1668 from lp.registry.interfaces.series import SeriesStatus
1669 from lp.registry.interfaces.distroseries import IDistroSeries
1670 from lp.registry.interfaces.person import (
1671- IPerson, validate_person_not_private_membership)
1672+ IPerson, validate_person)
1673 from lp.registry.interfaces.product import IProduct
1674 from lp.registry.interfaces.productseries import IProductSeries
1675 from lp.registry.interfaces.sourcepackage import ISourcePackage
1676@@ -115,7 +115,7 @@
1677 notNull=False)
1678 importer = ForeignKey(
1679 dbName='importer', foreignKey='Person',
1680- storm_validator=validate_person_not_private_membership,
1681+ storm_validator=validate_person,
1682 notNull=True)
1683 dateimported = UtcDateTimeCol(dbName='dateimported', notNull=True,
1684 default=DEFAULT)

Subscribers

People subscribed via source and target branches

to status/vote changes: