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
=== modified file 'database/sampledata/current-dev.sql'
--- database/sampledata/current-dev.sql 2010-07-28 16:39:53 +0000
+++ database/sampledata/current-dev.sql 2010-07-29 20:21:16 +0000
@@ -1786,7 +1786,7 @@
1786INSERT 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);1786INSERT 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);
1787INSERT 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);1787INSERT 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);
1788INSERT 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);1788INSERT 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);
1789INSERT 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);1789INSERT 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);
1790INSERT 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);1790INSERT 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);
1791INSERT 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);1791INSERT 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);
1792INSERT 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);1792INSERT 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);
@@ -5046,7 +5046,7 @@
5046INSERT 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);5046INSERT 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);
5047INSERT 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);5047INSERT 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);
5048INSERT 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);5048INSERT 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);
5049INSERT 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);5049INSERT 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);
5050INSERT 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);5050INSERT 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);
5051INSERT 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);5051INSERT 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);
5052INSERT 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);5052INSERT 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);
50535053
=== modified file 'database/sampledata/current.sql'
--- database/sampledata/current.sql 2010-07-28 16:39:53 +0000
+++ database/sampledata/current.sql 2010-07-29 20:21:16 +0000
@@ -1765,7 +1765,7 @@
1765INSERT 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);1765INSERT 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);
1766INSERT 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);1766INSERT 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);
1767INSERT 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);1767INSERT 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);
1768INSERT 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);1768INSERT 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);
1769INSERT 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);1769INSERT 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);
1770INSERT 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);1770INSERT 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);
1771INSERT 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);1771INSERT 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);
@@ -4972,7 +4972,7 @@
4972INSERT 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);4972INSERT 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);
4973INSERT 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);4973INSERT 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);
4974INSERT 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);4974INSERT 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);
4975INSERT 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);4975INSERT 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);
4976INSERT 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);4976INSERT 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);
4977INSERT 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);4977INSERT 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);
4978INSERT 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);4978INSERT 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);
49794979
=== modified file 'database/schema/Makefile'
--- database/schema/Makefile 2010-07-10 10:15:14 +0000
+++ database/schema/Makefile 2010-07-29 20:21:16 +0000
@@ -50,6 +50,8 @@
50# given database ($1) into an SQL file ($2).50# given database ($1) into an SQL file ($2).
51build_new_sampledata=$(PYTHON) fti.py --null -d ${1} -q; \51build_new_sampledata=$(PYTHON) fti.py --null -d ${1} -q; \
52 echo $(HEADER) > $(2); \52 echo $(HEADER) > $(2); \
53 echo -n "-- Created using " >> $(2); \
54 pg_dump --version >> $(2); \
53 pg_dump --schema=public --disable-triggers -a --column-inserts -O ${1} \55 pg_dump --schema=public --disable-triggers -a --column-inserts -O ${1} \
54 | grep -v "\( TOC \|INSERT INTO launchpaddatabaserevision \|sessiondata\|sessionpkgdata\|SELECT pg_catalog\.setval\|^--\| fticache \|'fticache'\|ALTER TABLE secret\|INSERT INTO secret\)" \56 | grep -v "\( TOC \|INSERT INTO launchpaddatabaserevision \|sessiondata\|sessionpkgdata\|SELECT pg_catalog\.setval\|^--\| fticache \|'fticache'\|ALTER TABLE secret\|INSERT INTO secret\)" \
55 | $(PYTHON) sort_sql.py >> $(2); \57 | $(PYTHON) sort_sql.py >> $(2); \
5658
=== modified file 'lib/canonical/launchpad/doc/tales.txt'
--- lib/canonical/launchpad/doc/tales.txt 2010-07-15 08:38:19 +0000
+++ lib/canonical/launchpad/doc/tales.txt 2010-07-29 20:21:16 +0000
@@ -1566,7 +1566,7 @@
1566data for link, displayname, and unique_displayname if the current user1566data for link, displayname, and unique_displayname if the current user
1567has the appropriate privileges.1567has the appropriate privileges.
15681568
1569The team 'myteam' is a private membership team so only the team members1569The team 'myteam' is a private team so only the team members
1570and Launchpad admins can see the details.1570and Launchpad admins can see the details.
15711571
1572Foo Bar is an administrator so he can see all.1572Foo Bar is an administrator so he can see all.
15731573
=== modified file 'lib/canonical/launchpad/fields/__init__.py'
--- lib/canonical/launchpad/fields/__init__.py 2010-07-22 12:17:41 +0000
+++ lib/canonical/launchpad/fields/__init__.py 2010-07-29 20:21:16 +0000
@@ -34,7 +34,6 @@
34 'MugshotImageUpload',34 'MugshotImageUpload',
35 'NoneableDescription',35 'NoneableDescription',
36 'NoneableTextLine',36 'NoneableTextLine',
37 'ParticipatingPersonChoice',
38 'PasswordField',37 'PasswordField',
39 'PersonChoice',38 'PersonChoice',
40 'PillarAliases',39 'PillarAliases',
@@ -53,7 +52,6 @@
53 'URIField',52 'URIField',
54 'UniqueField',53 'UniqueField',
55 'Whiteboard',54 'Whiteboard',
56 'is_private_membership_person',
57 'is_public_person',55 'is_public_person',
58 ]56 ]
5957
@@ -173,7 +171,8 @@
173171
174 * whitespace is stripped from the input value172 * whitespace is stripped from the input value
175 * if the field requires (or forbids) a trailing slash on the URI,173 * if the field requires (or forbids) a trailing slash on the URI,
176 ensures that the widget ends in a slash (or doesn't end in a slash).174 ensures that the widget ends in a slash (or doesn't end in a
175 slash).
177 * the URI is canonicalized.176 * the URI is canonicalized.
178 """177 """
179178
@@ -766,14 +765,6 @@
766 return person.visibility == PersonVisibility.PUBLIC765 return person.visibility == PersonVisibility.PUBLIC
767766
768767
769def is_private_membership_person(person):
770 """True if the person/team has private membership visibility."""
771 from canonical.launchpad.interfaces import IPerson, PersonVisibility
772 if not IPerson.providedBy(person):
773 return False
774 return person.visibility == PersonVisibility.PRIVATE_MEMBERSHIP
775
776
777class PrivateTeamNotAllowed(ConstraintNotSatisfied):768class PrivateTeamNotAllowed(ConstraintNotSatisfied):
778 __doc__ = _("A private team is not allowed.")769 __doc__ = _("A private team is not allowed.")
779770
@@ -801,20 +792,3 @@
801 else:792 else:
802 # The vocabulary prevents the revealing of private team names.793 # The vocabulary prevents the revealing of private team names.
803 raise PrivateTeamNotAllowed(value)794 raise PrivateTeamNotAllowed(value)
804
805
806class ParticipatingPersonChoice(PersonChoice):
807 """A person or team who is not a private membership team.
808
809 A person can participate in all contexts. A PRIVATE team can participate
810 in many contexts, depending up on the permissions of the logged in
811 user. A PRIVATE MEMBERSHIP team is severely limited in the roles in which
812 it can participate.
813 """
814
815 def constraint(self, value):
816 if not is_private_membership_person(value):
817 return True
818 else:
819 # The vocabulary prevents the revealing of private team names.
820 raise PrivateMembershipTeamNotAllowed(value)
821795
=== modified file 'lib/canonical/launchpad/security.py'
--- lib/canonical/launchpad/security.py 2010-07-26 19:22:16 +0000
+++ lib/canonical/launchpad/security.py 2010-07-29 20:21:16 +0000
@@ -654,7 +654,7 @@
654 """Verify that the user can view the team's membership.654 """Verify that the user can view the team's membership.
655655
656 Anyone can see a public team's membership. Only a team member or656 Anyone can see a public team's membership. Only a team member or
657 a Launchpad admin can view a private membership.657 a Launchpad admin can view a private team.
658 """658 """
659 if self.obj.team.visibility == PersonVisibility.PUBLIC:659 if self.obj.team.visibility == PersonVisibility.PUBLIC:
660 return True660 return True
@@ -708,9 +708,9 @@
708708
709709
710class ViewPublicOrPrivateTeamMembers(AuthorizationBase):710class ViewPublicOrPrivateTeamMembers(AuthorizationBase):
711 """Restrict viewing of private memberships of teams.711 """Restrict viewing of private teams.
712712
713 Only members of a team with a private membership can view the713 Only members of a private team can view the
714 membership list.714 membership list.
715 """715 """
716 permission = 'launchpad.View'716 permission = 'launchpad.View'
@@ -726,7 +726,7 @@
726 """Verify that the user can view the team's membership.726 """Verify that the user can view the team's membership.
727727
728 Anyone can see a public team's membership. Only a team member728 Anyone can see a public team's membership. Only a team member
729 or a Launchpad admin can view a private membership.729 or a Launchpad admin can view a private team's members.
730 """730 """
731 if self.obj.visibility == PersonVisibility.PUBLIC:731 if self.obj.visibility == PersonVisibility.PUBLIC:
732 return True732 return True
@@ -2068,8 +2068,7 @@
2068class ViewArchive(AuthorizationBase):2068class ViewArchive(AuthorizationBase):
2069 """Restrict viewing of private archives.2069 """Restrict viewing of private archives.
20702070
2071 Only admins or members of a team with a private membership can2071 Only admins or members of a private team can view the archive.
2072 view the archive.
2073 """2072 """
2074 permission = 'launchpad.View'2073 permission = 'launchpad.View'
2075 usedfor = IArchive2074 usedfor = IArchive
20762075
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2010-07-15 07:39:09 +0000
+++ lib/lp/bugs/browser/bugtask.py 2010-07-29 20:21:16 +0000
@@ -88,7 +88,7 @@
88from canonical.database.sqlbase import cursor88from canonical.database.sqlbase import cursor
89from canonical.launchpad import _89from canonical.launchpad import _
90from canonical.cachedproperty import cachedproperty90from canonical.cachedproperty import cachedproperty
91from canonical.launchpad.fields import ParticipatingPersonChoice91from canonical.launchpad.fields import PersonChoice
92from canonical.launchpad.mailnotification import get_unified_diff92from canonical.launchpad.mailnotification import get_unified_diff
93from canonical.launchpad.validators import LaunchpadValidationError93from canonical.launchpad.validators import LaunchpadValidationError
94from canonical.launchpad.webapp import (94from canonical.launchpad.webapp import (
@@ -205,6 +205,7 @@
205 title = title[3:]205 title = title[3:]
206 return title.strip()206 return title.strip()
207207
208
208def get_comments_for_bugtask(bugtask, truncate=False):209def get_comments_for_bugtask(bugtask, truncate=False):
209 """Return BugComments related to a bugtask.210 """Return BugComments related to a bugtask.
210211
@@ -218,7 +219,7 @@
218 message_id = attachment.message.id219 message_id = attachment.message.id
219 # All attachments are related to a message, so we can be220 # All attachments are related to a message, so we can be
220 # sure that the BugComment is already created.221 # sure that the BugComment is already created.
221 assert comments.has_key(message_id), message_id222 assert message_id in comments, message_id
222 if attachment.type == BugAttachmentType.PATCH:223 if attachment.type == BugAttachmentType.PATCH:
223 comments[message_id].patches.append(attachment)224 comments[message_id].patches.append(attachment)
224 else:225 else:
@@ -1112,8 +1113,8 @@
1112 """Return the list of available official tags for the bug as JSON.1113 """Return the list of available official tags for the bug as JSON.
11131114
1114 The list comprises of the official tags for all targets for which the1115 The list comprises of the official tags for all targets for which the
1115 bug has a task. It is returned as Javascript snippet, to be ambedded in1116 bug has a task. It is returned as Javascript snippet, to be embedded
1116 the bug page.1117 in the bug page.
1117 """1118 """
1118 available_tags = set()1119 available_tags = set()
1119 for task in self.context.bug.bugtasks:1120 for task in self.context.bug.bugtasks:
@@ -1502,7 +1503,7 @@
1502 self.form_fields.get('assignee', False)):1503 self.form_fields.get('assignee', False)):
1503 # Make the assignee field editable1504 # Make the assignee field editable
1504 self.form_fields = self.form_fields.omit('assignee')1505 self.form_fields = self.form_fields.omit('assignee')
1505 self.form_fields += formlib.form.Fields(ParticipatingPersonChoice(1506 self.form_fields += formlib.form.Fields(PersonChoice(
1506 __name__='assignee', title=_('Assigned to'), required=False,1507 __name__='assignee', title=_('Assigned to'), required=False,
1507 vocabulary=get_assignee_vocabulary(self.context),1508 vocabulary=get_assignee_vocabulary(self.context),
1508 readonly=False))1509 readonly=False))
15091510
=== modified file 'lib/lp/bugs/interfaces/bugsubscription.py'
--- lib/lp/bugs/interfaces/bugsubscription.py 2010-03-22 23:02:50 +0000
+++ lib/lp/bugs/interfaces/bugsubscription.py 2010-07-29 20:21:16 +0000
@@ -14,7 +14,7 @@
14from zope.interface import Interface, Attribute14from zope.interface import Interface, Attribute
15from zope.schema import Int, Datetime15from zope.schema import Int, Datetime
16from canonical.launchpad import _16from canonical.launchpad import _
17from canonical.launchpad.fields import ParticipatingPersonChoice17from canonical.launchpad.fields import PersonChoice
18from lp.bugs.interfaces.bug import IBug18from lp.bugs.interfaces.bug import IBug
1919
20from lazr.restful.declarations import (20from lazr.restful.declarations import (
@@ -22,13 +22,14 @@
22 export_read_operation, exported)22 export_read_operation, exported)
23from lazr.restful.fields import Reference23from lazr.restful.fields import Reference
2424
25
25class IBugSubscription(Interface):26class IBugSubscription(Interface):
26 """The relationship between a person and a bug."""27 """The relationship between a person and a bug."""
2728
28 export_as_webservice_entry()29 export_as_webservice_entry()
2930
30 id = Int(title=_('ID'), readonly=True, required=True)31 id = Int(title=_('ID'), readonly=True, required=True)
31 person = exported(ParticipatingPersonChoice(32 person = exported(PersonChoice(
32 title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',33 title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',
33 readonly=True, description=_("The person's Launchpad ID or "34 readonly=True, description=_("The person's Launchpad ID or "
34 "e-mail address.")))35 "e-mail address.")))
@@ -36,7 +37,7 @@
36 IBug, title=_("Bug"), required=True, readonly=True))37 IBug, title=_("Bug"), required=True, readonly=True))
37 date_created = exported(38 date_created = exported(
38 Datetime(title=_('Date subscribed'), required=True, readonly=True))39 Datetime(title=_('Date subscribed'), required=True, readonly=True))
39 subscribed_by = exported(ParticipatingPersonChoice(40 subscribed_by = exported(PersonChoice(
40 title=_('Subscribed by'), required=True,41 title=_('Subscribed by'), required=True,
41 vocabulary='ValidPersonOrTeam', readonly=True,42 vocabulary='ValidPersonOrTeam', readonly=True,
42 description=_("The person who created this subscription.")))43 description=_("The person who created this subscription.")))
4344
=== modified file 'lib/lp/bugs/interfaces/bugsupervisor.py'
--- lib/lp/bugs/interfaces/bugsupervisor.py 2010-06-16 17:55:37 +0000
+++ lib/lp/bugs/interfaces/bugsupervisor.py 2010-07-29 20:21:16 +0000
@@ -12,7 +12,7 @@
12 ]12 ]
1313
14from canonical.launchpad import _14from canonical.launchpad import _
15from canonical.launchpad.fields import ParticipatingPersonChoice15from canonical.launchpad.fields import PersonChoice
1616
17from zope.interface import Interface17from zope.interface import Interface
1818
@@ -24,7 +24,7 @@
2424
25class IHasBugSupervisor(Interface):25class IHasBugSupervisor(Interface):
2626
27 bug_supervisor = exported(ParticipatingPersonChoice(27 bug_supervisor = exported(PersonChoice(
28 title=_("Bug Supervisor"),28 title=_("Bug Supervisor"),
29 description=_(29 description=_(
30 "The Launchpad id of the person or team (preferred) responsible "30 "The Launchpad id of the person or team (preferred) responsible "
3131
=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
--- lib/lp/bugs/interfaces/bugtask.py 2010-07-26 12:49:23 +0000
+++ lib/lp/bugs/interfaces/bugtask.py 2010-07-29 20:21:16 +0000
@@ -57,7 +57,7 @@
5757
58from canonical.launchpad import _58from canonical.launchpad import _
59from canonical.launchpad.fields import (59from canonical.launchpad.fields import (
60 BugField, ParticipatingPersonChoice, ProductNameField, SearchTag,60 BugField, PersonChoice, ProductNameField, SearchTag,
61 StrippedTextLine, Summary)61 StrippedTextLine, Summary)
62from lp.bugs.interfaces.bugwatch import (62from lp.bugs.interfaces.bugwatch import (
63 IBugWatch, IBugWatchSet, NoBugTrackerFound, UnrecognizedBugTrackerURL)63 IBugWatch, IBugWatchSet, NoBugTrackerFound, UnrecognizedBugTrackerURL)
@@ -437,7 +437,7 @@
437 statusexplanation = Text(437 statusexplanation = Text(
438 title=_("Status notes (optional)"), required=False)438 title=_("Status notes (optional)"), required=False)
439 assignee = exported(439 assignee = exported(
440 ParticipatingPersonChoice(440 PersonChoice(
441 title=_('Assigned to'), required=False,441 title=_('Assigned to'), required=False,
442 vocabulary='ValidAssignee',442 vocabulary='ValidAssignee',
443 readonly=True))443 readonly=True))
444444
=== modified file 'lib/lp/bugs/model/bugactivity.py'
--- lib/lp/bugs/model/bugactivity.py 2009-06-25 00:40:31 +0000
+++ lib/lp/bugs/model/bugactivity.py 2010-07-29 20:21:16 +0000
@@ -14,8 +14,7 @@
14from lp.bugs.interfaces.bugactivity import IBugActivity, IBugActivitySet14from lp.bugs.interfaces.bugactivity import IBugActivity, IBugActivitySet
15from canonical.database.sqlbase import SQLBase15from canonical.database.sqlbase import SQLBase
16from canonical.database.datetimecol import UtcDateTimeCol16from canonical.database.datetimecol import UtcDateTimeCol
17from lp.registry.interfaces.person import (17from lp.registry.interfaces.person import validate_person
18 validate_person_not_private_membership)
1918
2019
21class BugActivity(SQLBase):20class BugActivity(SQLBase):
@@ -28,7 +27,7 @@
28 datechanged = UtcDateTimeCol(notNull=True)27 datechanged = UtcDateTimeCol(notNull=True)
29 person = ForeignKey(28 person = ForeignKey(
30 dbName='person', foreignKey='Person',29 dbName='person', foreignKey='Person',
31 storm_validator=validate_person_not_private_membership,30 storm_validator=validate_person,
32 notNull=True)31 notNull=True)
33 whatchanged = StringCol(notNull=True)32 whatchanged = StringCol(notNull=True)
34 oldvalue = StringCol(default=None)33 oldvalue = StringCol(default=None)
3534
=== modified file 'lib/lp/bugs/model/bugsubscription.py'
--- lib/lp/bugs/model/bugsubscription.py 2010-03-22 23:02:50 +0000
+++ lib/lp/bugs/model/bugsubscription.py 2010-07-29 20:21:16 +0000
@@ -15,8 +15,7 @@
15from canonical.database.sqlbase import SQLBase15from canonical.database.sqlbase import SQLBase
1616
17from lp.bugs.interfaces.bugsubscription import IBugSubscription17from lp.bugs.interfaces.bugsubscription import IBugSubscription
18from lp.registry.interfaces.person import (18from lp.registry.interfaces.person import validate_person
19 validate_person_not_private_membership)
2019
2120
22class BugSubscription(SQLBase):21class BugSubscription(SQLBase):
@@ -28,14 +27,14 @@
2827
29 person = ForeignKey(28 person = ForeignKey(
30 dbName='person', foreignKey='Person',29 dbName='person', foreignKey='Person',
31 storm_validator=validate_person_not_private_membership,30 storm_validator=validate_person,
32 notNull=True31 notNull=True
33 )32 )
34 bug = ForeignKey(dbName='bug', foreignKey='Bug', notNull=True)33 bug = ForeignKey(dbName='bug', foreignKey='Bug', notNull=True)
35 date_created = UtcDateTimeCol(notNull=True, default=UTC_NOW)34 date_created = UtcDateTimeCol(notNull=True, default=UTC_NOW)
36 subscribed_by = ForeignKey(35 subscribed_by = ForeignKey(
37 dbName='subscribed_by', foreignKey='Person',36 dbName='subscribed_by', foreignKey='Person',
38 storm_validator=validate_person_not_private_membership,37 storm_validator=validate_person,
39 notNull=True38 notNull=True
40 )39 )
4140
4241
=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py 2010-07-21 08:15:49 +0000
+++ lib/lp/bugs/model/bugtask.py 2010-07-29 20:21:16 +0000
@@ -88,8 +88,7 @@
88from canonical.launchpad.searchbuilder import (88from canonical.launchpad.searchbuilder import (
89 all, any, greater_than, NULL, not_equals)89 all, any, greater_than, NULL, not_equals)
90from lp.registry.interfaces.person import (90from lp.registry.interfaces.person import (
91 IPerson, validate_person_not_private_membership,91 IPerson, validate_person, validate_public_person)
92 validate_public_person)
93from canonical.launchpad.webapp.interfaces import (92from canonical.launchpad.webapp.interfaces import (
94 IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE, SLAVE_FLAVOR, NotFoundError)93 IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE, SLAVE_FLAVOR, NotFoundError)
9594
@@ -454,8 +453,8 @@
454453
455def validate_assignee(self, attr, value):454def validate_assignee(self, attr, value):
456 value = validate_conjoined_attribute(self, attr, value)455 value = validate_conjoined_attribute(self, attr, value)
457 # Check if this assignee is public.456 # Check if this person is valid and not None.
458 return validate_person_not_private_membership(self, attr, value)457 return validate_person(self, attr, value)
459458
460459
461@block_implicit_flushes460@block_implicit_flushes
@@ -772,7 +771,7 @@
772 # If nothing else, this is a distro task.771 # If nothing else, this is a distro task.
773 alsoProvides(self, IDistroBugTask)772 alsoProvides(self, IDistroBugTask)
774 else:773 else:
775 raise AssertionError, "Task %d is floating." % self.id774 raise AssertionError("Task %d is floating." % self.id)
776775
777 @property776 @property
778 def target_uses_malone(self):777 def target_uses_malone(self):
@@ -1646,41 +1645,41 @@
1646 structural_subscriber_clause = ( """BugTask.id IN (1645 structural_subscriber_clause = ( """BugTask.id IN (
1647 SELECT BugTask.id FROM BugTask, StructuralSubscription1646 SELECT BugTask.id FROM BugTask, StructuralSubscription
1648 WHERE BugTask.product = StructuralSubscription.product1647 WHERE BugTask.product = StructuralSubscription.product
1649 AND StructuralSubscription.subscriber = %(personid)s1648 AND StructuralSubscription.subscriber = %(personid)s
1650 UNION ALL1649 UNION ALL
1651 SELECT BugTask.id FROM BugTask, StructuralSubscription1650 SELECT BugTask.id FROM BugTask, StructuralSubscription
1652 WHERE1651 WHERE
1653 BugTask.distribution = StructuralSubscription.distribution1652 BugTask.distribution = StructuralSubscription.distribution
1654 AND BugTask.sourcepackagename =1653 AND BugTask.sourcepackagename =
1655 StructuralSubscription.sourcepackagename1654 StructuralSubscription.sourcepackagename
1656 AND StructuralSubscription.subscriber = %(personid)s1655 AND StructuralSubscription.subscriber = %(personid)s
1657 UNION ALL1656 UNION ALL
1658 SELECT BugTask.id FROM BugTask, StructuralSubscription1657 SELECT BugTask.id FROM BugTask, StructuralSubscription
1659 WHERE1658 WHERE
1660 BugTask.distroseries = StructuralSubscription.distroseries1659 BugTask.distroseries = StructuralSubscription.distroseries
1661 AND StructuralSubscription.subscriber = %(personid)s1660 AND StructuralSubscription.subscriber = %(personid)s
1662 UNION ALL1661 UNION ALL
1663 SELECT BugTask.id FROM BugTask, StructuralSubscription1662 SELECT BugTask.id FROM BugTask, StructuralSubscription
1664 WHERE1663 WHERE
1665 BugTask.milestone = StructuralSubscription.milestone1664 BugTask.milestone = StructuralSubscription.milestone
1666 AND StructuralSubscription.subscriber = %(personid)s1665 AND StructuralSubscription.subscriber = %(personid)s
1667 UNION ALL1666 UNION ALL
1668 SELECT BugTask.id FROM BugTask, StructuralSubscription1667 SELECT BugTask.id FROM BugTask, StructuralSubscription
1669 WHERE1668 WHERE
1670 BugTask.productseries = StructuralSubscription.productseries1669 BugTask.productseries = StructuralSubscription.productseries
1671 AND StructuralSubscription.subscriber = %(personid)s1670 AND StructuralSubscription.subscriber = %(personid)s
1672 UNION ALL1671 UNION ALL
1673 SELECT BugTask.id FROM BugTask, StructuralSubscription, Product1672 SELECT BugTask.id FROM BugTask, StructuralSubscription, Product
1674 WHERE1673 WHERE
1675 BugTask.product = Product.id1674 BugTask.product = Product.id
1676 AND Product.project = StructuralSubscription.project1675 AND Product.project = StructuralSubscription.project
1677 AND StructuralSubscription.subscriber = %(personid)s1676 AND StructuralSubscription.subscriber = %(personid)s
1678 UNION ALL1677 UNION ALL
1679 SELECT BugTask.id FROM BugTask, StructuralSubscription1678 SELECT BugTask.id FROM BugTask, StructuralSubscription
1680 WHERE1679 WHERE
1681 BugTask.distribution = StructuralSubscription.distribution1680 BugTask.distribution = StructuralSubscription.distribution
1682 AND StructuralSubscription.sourcepackagename is NULL1681 AND StructuralSubscription.sourcepackagename is NULL
1683 AND StructuralSubscription.subscriber = %(personid)s)""" %1682 AND StructuralSubscription.subscriber = %(personid)s)""" %
1684 sqlvalues(personid=params.structural_subscriber))1683 sqlvalues(personid=params.structural_subscriber))
1685 extra_clauses.append(structural_subscriber_clause)1684 extra_clauses.append(structural_subscriber_clause)
16861685
@@ -1744,7 +1743,8 @@
1744 UNION ALL1743 UNION ALL
1745 SELECT BugTask.id1744 SELECT BugTask.id
1746 FROM BugTask, StructuralSubscription1745 FROM BugTask, StructuralSubscription
1747 WHERE BugTask.distribution = StructuralSubscription.distribution1746 WHERE
1747 BugTask.distribution = StructuralSubscription.distribution
1748 AND BugTask.sourcepackagename =1748 AND BugTask.sourcepackagename =
1749 StructuralSubscription.sourcepackagename1749 StructuralSubscription.sourcepackagename
1750 AND StructuralSubscription.subscriber = %(bug_supervisor)s1750 AND StructuralSubscription.subscriber = %(bug_supervisor)s
17511751
=== modified file 'lib/lp/code/interfaces/branch.py'
--- lib/lp/code/interfaces/branch.py 2010-07-26 09:15:31 +0000
+++ lib/lp/code/interfaces/branch.py 2010-07-29 20:21:16 +0000
@@ -56,7 +56,7 @@
5656
57from canonical.launchpad import _57from canonical.launchpad import _
58from canonical.launchpad.fields import (58from canonical.launchpad.fields import (
59 ParticipatingPersonChoice, PublicPersonChoice, URIField, Whiteboard)59 PersonChoice, PublicPersonChoice, URIField, Whiteboard)
60from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities60from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
61from canonical.launchpad.validators import LaunchpadValidationError61from canonical.launchpad.validators import LaunchpadValidationError
62from canonical.launchpad.webapp.interfaces import (62from canonical.launchpad.webapp.interfaces import (
@@ -361,7 +361,7 @@
361 vocabulary='ValidPersonOrTeam'))361 vocabulary='ValidPersonOrTeam'))
362362
363 owner = exported(363 owner = exported(
364 ParticipatingPersonChoice(364 PersonChoice(
365 title=_('Owner'),365 title=_('Owner'),
366 required=True, readonly=True,366 required=True, readonly=True,
367 vocabulary='UserTeamsParticipationPlusSelf',367 vocabulary='UserTeamsParticipationPlusSelf',
368368
=== modified file 'lib/lp/code/interfaces/branchsubscription.py'
--- lib/lp/code/interfaces/branchsubscription.py 2010-05-28 04:18:17 +0000
+++ lib/lp/code/interfaces/branchsubscription.py 2010-07-29 20:21:16 +0000
@@ -19,7 +19,7 @@
19 BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel,19 BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel,
20 CodeReviewNotificationLevel)20 CodeReviewNotificationLevel)
21from lp.code.interfaces.branch import IBranch21from lp.code.interfaces.branch import IBranch
22from canonical.launchpad.fields import ParticipatingPersonChoice22from canonical.launchpad.fields import PersonChoice
23from lazr.restful.declarations import (23from lazr.restful.declarations import (
24 REQUEST_USER, call_with, export_as_webservice_entry,24 REQUEST_USER, call_with, export_as_webservice_entry,
25 export_read_operation, exported)25 export_read_operation, exported)
@@ -32,7 +32,7 @@
3232
33 id = Int(title=_('ID'), readonly=True, required=True)33 id = Int(title=_('ID'), readonly=True, required=True)
34 person = exported(34 person = exported(
35 ParticipatingPersonChoice(35 PersonChoice(
36 title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',36 title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',
37 readonly=True, description=_('Enter the launchpad id, or email '37 readonly=True, description=_('Enter the launchpad id, or email '
38 'address of the person you wish to subscribe to this branch. '38 'address of the person you wish to subscribe to this branch. '
@@ -75,7 +75,7 @@
75 'notifications.'75 'notifications.'
76 )))76 )))
7777
78 subscribed_by = exported(ParticipatingPersonChoice(78 subscribed_by = exported(PersonChoice(
79 title=_('Subscribed by'), required=True,79 title=_('Subscribed by'), required=True,
80 vocabulary='ValidPersonOrTeam', readonly=True,80 vocabulary='ValidPersonOrTeam', readonly=True,
81 description=_("The person who created this subscription.")))81 description=_("The person who created this subscription.")))
8282
=== modified file 'lib/lp/code/interfaces/branchvisibilitypolicy.py'
--- lib/lp/code/interfaces/branchvisibilitypolicy.py 2010-04-16 15:06:55 +0000
+++ lib/lp/code/interfaces/branchvisibilitypolicy.py 2010-07-29 20:21:16 +0000
@@ -17,7 +17,7 @@
17from zope.schema import Choice17from zope.schema import Choice
1818
19from canonical.launchpad import _19from canonical.launchpad import _
20from canonical.launchpad.fields import ParticipatingPersonChoice20from canonical.launchpad.fields import PersonChoice
21from lp.code.enums import TeamBranchVisibilityRule21from lp.code.enums import TeamBranchVisibilityRule
2222
2323
@@ -89,7 +89,7 @@
89 The team may be null, in which case the rule applies to everyone.89 The team may be null, in which case the rule applies to everyone.
90 """90 """
9191
92 team = ParticipatingPersonChoice(92 team = PersonChoice(
93 title=_('Team'), required=True, vocabulary='ValidPersonOrTeam',93 title=_('Team'), required=True, vocabulary='ValidPersonOrTeam',
94 description=_("Specifies the team that the policy applies to. "94 description=_("Specifies the team that the policy applies to. "
95 "If None then the policy applies to everyone."))95 "If None then the policy applies to everyone."))
9696
=== modified file 'lib/lp/code/interfaces/sourcepackagerecipe.py'
--- lib/lp/code/interfaces/sourcepackagerecipe.py 2010-06-18 07:54:36 +0000
+++ lib/lp/code/interfaces/sourcepackagerecipe.py 2010-07-29 20:21:16 +0000
@@ -28,7 +28,7 @@
2828
29from canonical.launchpad import _29from canonical.launchpad import _
30from canonical.launchpad.fields import (30from canonical.launchpad.fields import (
31 ParticipatingPersonChoice, PublicPersonChoice31 PersonChoice, PublicPersonChoice
32)32)
33from canonical.launchpad.validators.name import name_validator33from canonical.launchpad.validators.name import name_validator
3434
@@ -84,7 +84,7 @@
84 vocabulary='ValidPersonOrTeam'))84 vocabulary='ValidPersonOrTeam'))
8585
86 owner = exported(86 owner = exported(
87 ParticipatingPersonChoice(87 PersonChoice(
88 title=_('Owner'),88 title=_('Owner'),
89 required=True, readonly=False,89 required=True, readonly=False,
90 vocabulary='UserTeamsParticipationPlusSelf',90 vocabulary='UserTeamsParticipationPlusSelf',
9191
=== modified file 'lib/lp/code/model/branch.py'
--- lib/lp/code/model/branch.py 2010-07-29 08:06:07 +0000
+++ lib/lp/code/model/branch.py 2010-07-29 20:21:16 +0000
@@ -80,7 +80,7 @@
80 IFindOfficialBranchLinks)80 IFindOfficialBranchLinks)
81from lp.codehosting.bzrutils import safe_open81from lp.codehosting.bzrutils import safe_open
82from lp.registry.interfaces.person import (82from lp.registry.interfaces.person import (
83 validate_person_not_private_membership, validate_public_person)83 validate_person, validate_public_person)
84from lp.services.database.prejoin import prejoin84from lp.services.database.prejoin import prejoin
85from lp.services.job.interfaces.job import JobStatus85from lp.services.job.interfaces.job import JobStatus
86from lp.services.mail.notificationrecipientset import (86from lp.services.mail.notificationrecipientset import (
@@ -127,7 +127,7 @@
127 storm_validator=validate_public_person, notNull=True)127 storm_validator=validate_public_person, notNull=True)
128 owner = ForeignKey(128 owner = ForeignKey(
129 dbName='owner', foreignKey='Person',129 dbName='owner', foreignKey='Person',
130 storm_validator=validate_person_not_private_membership, notNull=True)130 storm_validator=validate_person, notNull=True)
131131
132 def setOwner(self, new_owner, user):132 def setOwner(self, new_owner, user):
133 """See `IBranch`."""133 """See `IBranch`."""
134134
=== modified file 'lib/lp/code/model/branchsubscription.py'
--- lib/lp/code/model/branchsubscription.py 2010-05-28 04:18:17 +0000
+++ lib/lp/code/model/branchsubscription.py 2010-07-29 20:21:16 +0000
@@ -21,8 +21,7 @@
21from lp.code.interfaces.branch import IBranchNavigationMenu21from lp.code.interfaces.branch import IBranchNavigationMenu
22from lp.code.interfaces.branchtarget import IHasBranchTarget22from lp.code.interfaces.branchtarget import IHasBranchTarget
23from lp.code.security import BranchSubscriptionEdit23from lp.code.security import BranchSubscriptionEdit
24from lp.registry.interfaces.person import (24from lp.registry.interfaces.person import validate_person
25 validate_person_not_private_membership)
2625
2726
28class BranchSubscription(SQLBase):27class BranchSubscription(SQLBase):
@@ -34,7 +33,7 @@
3433
35 person = ForeignKey(34 person = ForeignKey(
36 dbName='person', foreignKey='Person',35 dbName='person', foreignKey='Person',
37 storm_validator=validate_person_not_private_membership, notNull=True)36 storm_validator=validate_person, notNull=True)
38 branch = ForeignKey(dbName='branch', foreignKey='Branch', notNull=True)37 branch = ForeignKey(dbName='branch', foreignKey='Branch', notNull=True)
39 notification_level = EnumCol(enum=BranchSubscriptionNotificationLevel,38 notification_level = EnumCol(enum=BranchSubscriptionNotificationLevel,
40 notNull=True, default=DEFAULT)39 notNull=True, default=DEFAULT)
@@ -44,7 +43,7 @@
44 notNull=True, default=DEFAULT)43 notNull=True, default=DEFAULT)
45 subscribed_by = ForeignKey(44 subscribed_by = ForeignKey(
46 dbName='subscribed_by', foreignKey='Person',45 dbName='subscribed_by', foreignKey='Person',
47 storm_validator=validate_person_not_private_membership, notNull=True)46 storm_validator=validate_person, notNull=True)
4847
49 @property48 @property
50 def target(self):49 def target(self):
5150
=== modified file 'lib/lp/code/model/branchvisibilitypolicy.py'
--- lib/lp/code/model/branchvisibilitypolicy.py 2010-04-19 09:39:29 +0000
+++ lib/lp/code/model/branchvisibilitypolicy.py 2010-07-29 20:21:16 +0000
@@ -25,8 +25,7 @@
25from lp.code.enums import BranchVisibilityRule25from lp.code.enums import BranchVisibilityRule
26from lp.code.interfaces.branchvisibilitypolicy import (26from lp.code.interfaces.branchvisibilitypolicy import (
27 IBranchVisibilityTeamPolicy, InvalidVisibilityPolicy)27 IBranchVisibilityTeamPolicy, InvalidVisibilityPolicy)
28from lp.registry.interfaces.person import (28from lp.registry.interfaces.person import validate_person
29 validate_person_not_private_membership)
30from lp.registry.interfaces.product import IProduct29from lp.registry.interfaces.product import IProduct
31from lp.registry.interfaces.projectgroup import IProjectGroup30from lp.registry.interfaces.projectgroup import IProjectGroup
3231
@@ -41,7 +40,7 @@
41 product = ForeignKey(dbName='product', foreignKey='Product')40 product = ForeignKey(dbName='product', foreignKey='Product')
42 team = ForeignKey(41 team = ForeignKey(
43 dbName='team', foreignKey='Person',42 dbName='team', foreignKey='Person',
44 storm_validator=validate_person_not_private_membership,43 storm_validator=validate_person,
45 default=None)44 default=None)
46 rule = EnumCol(45 rule = EnumCol(
47 dbName="policy", enum=BranchVisibilityRule, notNull=True,46 dbName="policy", enum=BranchVisibilityRule, notNull=True,
4847
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2010-07-16 16:14:39 +0000
+++ lib/lp/registry/browser/person.py 2010-07-29 20:21:16 +0000
@@ -3326,8 +3326,6 @@
3326 def visibility_info(self):3326 def visibility_info(self):
3327 if self.context.visibility == PersonVisibility.PRIVATE:3327 if self.context.visibility == PersonVisibility.PRIVATE:
3328 return 'Private team'3328 return 'Private team'
3329 elif self.context.visibility == PersonVisibility.PRIVATE_MEMBERSHIP:
3330 return 'Team membership is viewable by team members'
3331 else:3329 else:
3332 return 'Public team'3330 return 'Public team'
33333331
@@ -3599,8 +3597,8 @@
35993597
3600 def add_ssh(self):3598 def add_ssh(self):
3601 sshkey = self.request.form.get('sshkey')3599 sshkey = self.request.form.get('sshkey')
3602 try:3600 try:
3603 getUtility(ISSHKeySet).new(self.user, sshkey)3601 getUtility(ISSHKeySet).new(self.user, sshkey)
3604 except SSHKeyAdditionError:3602 except SSHKeyAdditionError:
3605 self.error_message = structured('Invalid public key')3603 self.error_message = structured('Invalid public key')
3606 except SSHKeyCompromisedError:3604 except SSHKeyCompromisedError:
@@ -4004,12 +4002,11 @@
4004 and this team's visibility is either None or PUBLIC.4002 and this team's visibility is either None or PUBLIC.
4005 """4003 """
4006 # Joining a moderated team will put you on the proposed_members4004 # Joining a moderated team will put you on the proposed_members
4007 # list. If it is a private membership team, you are not allowed4005 # list. If it is a private team, you are not allowed to view the
4008 # to view the proposed_members attribute until you are an4006 # proposed_members attribute until you are an active member;
4009 # active member; therefore, it would look like the join button4007 # therefore, it would look like the join button is broken. Either
4010 # is broken. Either private membership teams should always have a4008 # private teams should always have a restricted subscription policy,
4011 # restricted subscription policy, or we need a more complicated4009 # or we need a more complicated permission model.
4012 # permission model.
4013 if not (self.context.visibility is None4010 if not (self.context.visibility is None
4014 or self.context.visibility == PersonVisibility.PUBLIC):4011 or self.context.visibility == PersonVisibility.PUBLIC):
4015 return False4012 return False
40164013
=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py 2010-07-16 16:14:39 +0000
+++ lib/lp/registry/browser/team.py 2010-07-29 20:21:16 +0000
@@ -166,28 +166,6 @@
166 """Remove the visibility field if not authorized."""166 """Remove the visibility field if not authorized."""
167 if not check_permission('launchpad.Commercial', self.context):167 if not check_permission('launchpad.Commercial', self.context):
168 self.form_fields = self.form_fields.omit('visibility')168 self.form_fields = self.form_fields.omit('visibility')
169 else:
170 # XXX: BradCrittenden 2010-07-12 bug=602773: This code can be
171 # removed when PRIVATE_MEMBERSHIP disappears fully.
172
173 # Remove the visibility selector and replace with one with a more
174 # limited vocabulary.
175 terms = [SimpleTerm(PersonVisibility.PUBLIC,
176 PersonVisibility.PUBLIC.name,
177 PersonVisibility.PUBLIC.title),
178 SimpleTerm(PersonVisibility.PRIVATE,
179 PersonVisibility.PRIVATE.name,
180 PersonVisibility.PRIVATE.title),
181 ]
182 visibility = self.form_fields['visibility'].field
183 field = Choice(
184 __name__=visibility.getName(),
185 title=visibility.title,
186 source=SimpleVocabulary(terms))
187 self.form_fields = (
188 self.form_fields.omit('visibility') +
189 form.Fields(field))
190 self.form_fields = self.form_fields.select(*self.field_names)
191169
192170
193class TeamEditView(TeamFormMixin, HasRenewalPolicyMixin,171class TeamEditView(TeamFormMixin, HasRenewalPolicyMixin,
194172
=== modified file 'lib/lp/registry/browser/tests/mailinglist-views.txt'
--- lib/lp/registry/browser/tests/mailinglist-views.txt 2010-07-12 16:29:33 +0000
+++ lib/lp/registry/browser/tests/mailinglist-views.txt 2010-07-29 20:21:16 +0000
@@ -186,7 +186,7 @@
186generates an Unauthorized exception which is turned into a NotFound in186generates an Unauthorized exception which is turned into a NotFound in
187publication so as to fool the wily hackers.187publication so as to fool the wily hackers.
188188
189 >>> # Create a private membership team.189 >>> # Create a private team.
190 >>> owner = person_set.getByEmail('owner@canonical.com')190 >>> owner = person_set.getByEmail('owner@canonical.com')
191 >>> login('foo.bar@canonical.com')191 >>> login('foo.bar@canonical.com')
192 >>> from lp.registry.interfaces.person import PersonVisibility192 >>> from lp.registry.interfaces.person import PersonVisibility
193193
=== modified file 'lib/lp/registry/doc/person.txt'
--- lib/lp/registry/doc/person.txt 2010-07-16 13:34:38 +0000
+++ lib/lp/registry/doc/person.txt 2010-07-29 20:21:16 +0000
@@ -919,7 +919,7 @@
919 Warty Gnome Team (warty-gnome): []919 Warty Gnome Team (warty-gnome): []
920 Warty Security Team (name20): []920 Warty Security Team (name20): []
921921
922The Owner user is a member of the private membership team 'myteam' so922The Owner user is a member of the private team 'myteam' so
923the previous search will include myteam in the results.923the previous search will include myteam in the results.
924924
925 >>> login('owner@canonical.com')925 >>> login('owner@canonical.com')
926926
=== modified file 'lib/lp/registry/doc/private-team-roles.txt'
--- lib/lp/registry/doc/private-team-roles.txt 2010-07-14 07:32:46 +0000
+++ lib/lp/registry/doc/private-team-roles.txt 2010-07-29 20:21:16 +0000
@@ -315,7 +315,7 @@
315 >>> private = PersonVisibility.PRIVATE315 >>> private = PersonVisibility.PRIVATE
316316
317 >>> visibility_list = list(PersonVisibility.items)317 >>> visibility_list = list(PersonVisibility.items)
318 >>> visibility_list.remove(PersonVisibility.PRIVATE_MEMBERSHIP)318
319 >>> for joined in visibility_list:319 >>> for joined in visibility_list:
320 ... for joiner in visibility_list:320 ... for joiner in visibility_list:
321 ... join_team(joined, joiner)321 ... join_team(joined, joiner)
322322
=== modified file 'lib/lp/registry/doc/private-team-visibility.txt'
--- lib/lp/registry/doc/private-team-visibility.txt 2010-01-05 17:46:08 +0000
+++ lib/lp/registry/doc/private-team-visibility.txt 2010-07-29 20:21:16 +0000
@@ -2,9 +2,8 @@
2 Private team visibility2 Private team visibility
3=========================3=========================
44
5Private and private membership teams restrict the visibility of their5Private teams restrict the visibility of their attributes to select
6attributes to select sets of users in order to prevent leaking6sets of users in order to prevent leaking confidential data.
7confidential data.
87
9Private teams restrict the viewing of the membership list8Private teams restrict the viewing of the membership list
10to team administrators, other members of the team, and Launchpad9to team administrators, other members of the team, and Launchpad
1110
=== modified file 'lib/lp/registry/doc/vocabularies.txt'
--- lib/lp/registry/doc/vocabularies.txt 2010-07-20 10:08:02 +0000
+++ lib/lp/registry/doc/vocabularies.txt 2010-07-29 20:21:16 +0000
@@ -769,7 +769,7 @@
769769
770Almost all teams have the word 'team' as part of their names, so a search770Almost all teams have the word 'team' as part of their names, so a search
771for 'team' should give us some of them. Notice that the771for 'team' should give us some of them. Notice that the
772PRIVATE_MEMBERSHIP_TEAM 'myteam' is not included in the results.772PRIVATE_TEAM 'myteam' is not included in the results.
773773
774 >>> login_person(sample_person)774 >>> login_person(sample_person)
775 >>> ephemeral = factory.makeTeam(owner=foo_bar, name='ephemeral-team')775 >>> ephemeral = factory.makeTeam(owner=foo_bar, name='ephemeral-team')
@@ -791,15 +791,6 @@
791 u'testing-spanish-team', u'ubuntu-security', u'ubuntu-team',791 u'testing-spanish-team', u'ubuntu-security', u'ubuntu-team',
792 u'warty-gnome']792 u'warty-gnome']
793793
794Logging in as 'owner', who is a member of myteam shows that the token
795lookup still omits myteam.
796
797 >>> login('owner@canonical.com')
798 >>> sorted(person.name for person in vocab.search('team'))
799 [u'hwdb-team', u'name18', u'name20', u'name21', u'no-team-memberships',
800 u'otherteam', u'simple-team', u'testing-spanish-team',
801 u'ubuntu-security', u'ubuntu-team', u'warty-gnome']
802
803A PRIVATE team is displayed when the logged in user is a member of the team.794A PRIVATE team is displayed when the logged in user is a member of the team.
804795
805 >>> commercial = person_set.getByEmail('commercial-member@canonical.com')796 >>> commercial = person_set.getByEmail('commercial-member@canonical.com')
@@ -836,9 +827,10 @@
836827
837 >>> login('owner@canonical.com')828 >>> login('owner@canonical.com')
838 >>> sorted(person.name for person in vocab.search('team'))829 >>> sorted(person.name for person in vocab.search('team'))
839 [u'hwdb-team', u'name18', u'name20', u'name21', u'no-team-memberships',830 [u'hwdb-team', u'myteam', u'name18', u'name20', u'name21',
840 u'otherteam', u'simple-team', u'testing-spanish-team',831 u'no-team-memberships', u'otherteam', u'simple-team',
841 u'ubuntu-security', u'ubuntu-team', u'warty-gnome']832 u'testing-spanish-team', u'ubuntu-security', u'ubuntu-team',
833 u'warty-gnome']
842834
843The anonymous user will not see the private team either.835The anonymous user will not see the private team either.
844836
845837
=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py 2010-07-16 21:55:55 +0000
+++ lib/lp/registry/interfaces/person.py 2010-07-29 20:21:16 +0000
@@ -37,7 +37,7 @@
37 'TeamContactMethod',37 'TeamContactMethod',
38 'TeamMembershipRenewalPolicy',38 'TeamMembershipRenewalPolicy',
39 'TeamSubscriptionPolicy',39 'TeamSubscriptionPolicy',
40 'validate_person_not_private_membership',40 'validate_person',
41 'validate_public_person',41 'validate_public_person',
42 ]42 ]
4343
@@ -67,7 +67,7 @@
67from canonical.launchpad.fields import (67from canonical.launchpad.fields import (
68 BlacklistableContentNameField, IconImageUpload, LogoImageUpload,68 BlacklistableContentNameField, IconImageUpload, LogoImageUpload,
69 MugshotImageUpload, PasswordField, PersonChoice, PublicPersonChoice,69 MugshotImageUpload, PasswordField, PersonChoice, PublicPersonChoice,
70 StrippedTextLine, is_private_membership_person, is_public_person)70 StrippedTextLine, is_public_person)
71from canonical.launchpad.interfaces.account import AccountStatus, IAccount71from canonical.launchpad.interfaces.account import AccountStatus, IAccount
72from canonical.launchpad.interfaces.emailaddress import IEmailAddress72from canonical.launchpad.interfaces.emailaddress import IEmailAddress
73from canonical.launchpad.interfaces.launchpad import (73from canonical.launchpad.interfaces.launchpad import (
@@ -110,7 +110,7 @@
110110
111111
112@block_implicit_flushes112@block_implicit_flushes
113def validate_person(obj, attr, value, validate_func):113def validate_person_common(obj, attr, value, validate_func):
114 """Validate the person using the supplied function."""114 """Validate the person using the supplied function."""
115 if value is None:115 if value is None:
116 return None116 return None
@@ -121,7 +121,7 @@
121 # DB. This needs cleaning up.121 # DB. This needs cleaning up.
122 from lp.registry.model.person import Person122 from lp.registry.model.person import Person
123 person = Person.get(value)123 person = Person.get(value)
124 if validate_func(person):124 if not validate_func(person):
125 raise PrivatePersonLinkageError(125 raise PrivatePersonLinkageError(
126 "Cannot link person (name=%s, visibility=%s) to %s (name=%s)"126 "Cannot link person (name=%s, visibility=%s) to %s (name=%s)"
127 % (person.name, person.visibility.name,127 % (person.name, person.visibility.name,
@@ -129,18 +129,20 @@
129 return value129 return value
130130
131131
132def validate_person(obj, attr, value):
133 """Validate the person is a real person with no other restrictions."""
134 def validate(person):
135 return IPerson.providedBy(person)
136 return validate_person_common(obj, attr, value, validate)
137
138
132def validate_public_person(obj, attr, value):139def validate_public_person(obj, attr, value):
133 """Validate that the person identified by value is public."""140 """Validate that the person identified by value is public."""
134141
135 def validate(person):142 def validate(person):
136 return not is_public_person(person)143 return is_public_person(person)
137144
138 return validate_person(obj, attr, value, validate)145 return validate_person_common(obj, attr, value, validate)
139
140
141def validate_person_not_private_membership(obj, attr, value):
142 """Validate that the person (value) is not a private membership team."""
143 return validate_person(obj, attr, value, is_private_membership_person)
144146
145147
146class PersonalStanding(DBEnumeratedType):148class PersonalStanding(DBEnumeratedType):
@@ -378,14 +380,6 @@
378 Everyone can view all the attributes of this person.380 Everyone can view all the attributes of this person.
379 """)381 """)
380382
381 PRIVATE_MEMBERSHIP = DBItem(20, """
382 Private Membership
383
384 Only Launchpad admins and team members can view the
385 membership list for this team. The team is severely restricted in the
386 roles it can assume.
387 """)
388
389 PRIVATE = DBItem(30, """383 PRIVATE = DBItem(30, """
390 Private384 Private
391385
392386
=== modified file 'lib/lp/registry/interfaces/product.py'
--- lib/lp/registry/interfaces/product.py 2010-07-09 10:22:32 +0000
+++ lib/lp/registry/interfaces/product.py 2010-07-29 20:21:16 +0000
@@ -36,7 +36,7 @@
36from canonical.launchpad import _36from canonical.launchpad import _
37from canonical.launchpad.fields import (37from canonical.launchpad.fields import (
38 Description, IconImageUpload, LogoImageUpload, MugshotImageUpload,38 Description, IconImageUpload, LogoImageUpload, MugshotImageUpload,
39 ParticipatingPersonChoice, ProductBugTracker, ProductNameField,39 PersonChoice, ProductBugTracker, ProductNameField,
40 PublicPersonChoice, Summary, Title, URIField)40 PublicPersonChoice, Summary, Title, URIField)
41from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor41from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
42from lp.bugs.interfaces.securitycontact import IHasSecurityContact42from lp.bugs.interfaces.securitycontact import IHasSecurityContact
@@ -373,7 +373,7 @@
373 exported_as='project_group')373 exported_as='project_group')
374374
375 owner = exported(375 owner = exported(
376 ParticipatingPersonChoice(376 PersonChoice(
377 title=_('Maintainer'),377 title=_('Maintainer'),
378 required=True,378 required=True,
379 vocabulary='ValidOwner',379 vocabulary='ValidOwner',
@@ -390,7 +390,7 @@
390 "Launchpad.")))390 "Launchpad.")))
391391
392 driver = exported(392 driver = exported(
393 ParticipatingPersonChoice(393 PersonChoice(
394 title=_("Driver"),394 title=_("Driver"),
395 description=_(395 description=_(
396 "This person or team will be able to set feature goals for "396 "This person or team will be able to set feature goals for "
397397
=== modified file 'lib/lp/registry/interfaces/productrelease.py'
--- lib/lp/registry/interfaces/productrelease.py 2009-10-26 18:40:04 +0000
+++ lib/lp/registry/interfaces/productrelease.py 2010-07-29 20:21:16 +0000
@@ -28,7 +28,7 @@
28from canonical.launchpad import _28from canonical.launchpad import _
29from canonical.launchpad.validators.version import sane_version29from canonical.launchpad.validators.version import sane_version
30from canonical.launchpad.fields import (30from canonical.launchpad.fields import (
31 ContentNameField, ParticipatingPersonChoice)31 ContentNameField, PersonChoice)
32from canonical.launchpad.validators import LaunchpadValidationError32from canonical.launchpad.validators import LaunchpadValidationError
3333
34from lazr.restful.fields import CollectionField, Reference, ReferenceChoice34from lazr.restful.fields import CollectionField, Reference, ReferenceChoice
@@ -270,7 +270,7 @@
270 )270 )
271271
272 owner = exported(272 owner = exported(
273 ParticipatingPersonChoice(273 PersonChoice(
274 title=u"The owner of this release.",274 title=u"The owner of this release.",
275 required=True,275 required=True,
276 vocabulary='ValidOwner',276 vocabulary='ValidOwner',
@@ -357,6 +357,7 @@
357 Raises a NotFoundError if no matching ProductReleaseFile exists.357 Raises a NotFoundError if no matching ProductReleaseFile exists.
358 """358 """
359359
360
360class IProductRelease(IProductReleaseEditRestricted,361class IProductRelease(IProductReleaseEditRestricted,
361 IProductReleasePublic):362 IProductReleasePublic):
362 """A specific release (i.e. version) of a product.363 """A specific release (i.e. version) of a product.
@@ -366,6 +367,7 @@
366367
367 export_as_webservice_entry('project_release')368 export_as_webservice_entry('project_release')
368369
370
369# Set the schema for IProductReleaseFile now that IProductRelease is defined.371# Set the schema for IProductReleaseFile now that IProductRelease is defined.
370IProductReleaseFile['productrelease'].schema = IProductRelease372IProductReleaseFile['productrelease'].schema = IProductRelease
371373
372374
=== modified file 'lib/lp/registry/interfaces/productseries.py'
--- lib/lp/registry/interfaces/productseries.py 2010-06-11 18:05:59 +0000
+++ lib/lp/registry/interfaces/productseries.py 2010-07-29 20:21:16 +0000
@@ -19,7 +19,7 @@
19from zope.interface import Interface, Attribute19from zope.interface import Interface, Attribute
2020
21from canonical.launchpad.fields import (21from canonical.launchpad.fields import (
22 ContentNameField, ParticipatingPersonChoice, Title)22 ContentNameField, PersonChoice, Title)
23from lp.registry.interfaces.structuralsubscription import (23from lp.registry.interfaces.structuralsubscription import (
24 IStructuralSubscriptionTarget)24 IStructuralSubscriptionTarget)
25from lp.code.interfaces.branch import IBranch25from lp.code.interfaces.branch import IBranch
@@ -129,12 +129,12 @@
129 exported_as='date_created')129 exported_as='date_created')
130130
131 owner = exported(131 owner = exported(
132 ParticipatingPersonChoice(132 PersonChoice(
133 title=_('Owner'), required=True, vocabulary='ValidOwner',133 title=_('Owner'), required=True, vocabulary='ValidOwner',
134 description=_('Project owner, either a valid Person or Team')))134 description=_('Project owner, either a valid Person or Team')))
135135
136 driver = exported(136 driver = exported(
137 ParticipatingPersonChoice(137 PersonChoice(
138 title=_("Release manager"),138 title=_("Release manager"),
139 description=_(139 description=_(
140 "The person or team responsible for decisions about features "140 "The person or team responsible for decisions about features "
141141
=== modified file 'lib/lp/registry/interfaces/structuralsubscription.py'
--- lib/lp/registry/interfaces/structuralsubscription.py 2010-04-19 08:11:52 +0000
+++ lib/lp/registry/interfaces/structuralsubscription.py 2010-07-29 20:21:16 +0000
@@ -23,7 +23,7 @@
2323
24from canonical.launchpad import _24from canonical.launchpad import _
25from canonical.launchpad.fields import (25from canonical.launchpad.fields import (
26 ParticipatingPersonChoice, PublicPersonChoice)26 PersonChoice, PublicPersonChoice)
27from lp.registry.interfaces.person import IPerson27from lp.registry.interfaces.person import IPerson
2828
29from lazr.restful.declarations import (29from lazr.restful.declarations import (
@@ -49,19 +49,23 @@
49 LIFECYCLE = DBItem(20, """49 LIFECYCLE = DBItem(20, """
50 Lifecycle50 Lifecycle
5151
52 Only send a low volume of notifications about new bugs registered, bugs removed or bug targetting.52 Only send a low volume of notifications about new bugs registered,
53 bugs removed or bug targetting.
53 """)54 """)
5455
55 METADATA = DBItem(30, """56 METADATA = DBItem(30, """
56 Details57 Details
5758
58 Send bug lifecycle notifications, as well as notifications about changes to the bug's details like status and description.59 Send bug lifecycle notifications, as well as notifications about
60 changes to the bug's details like status and description.
59 """)61 """)
6062
61 COMMENTS = DBItem(40, """63 COMMENTS = DBItem(40, """
62 Discussion64 Discussion
6365
64 Send bug lifecycle notifications, detail change notifications and notifications about new events in the bugs's discussion, like new comments.66 Send bug lifecycle notifications, detail change notifications and
67 notifications about new events in the bugs's discussion, like new
68 comments.
65 """)69 """)
6670
6771
@@ -80,13 +84,15 @@
80 LIFECYCLE = DBItem(20, """84 LIFECYCLE = DBItem(20, """
81 Lifecycle85 Lifecycle
8286
83 Only send a low volume of notifications about new blueprints registered, blueprints accepted or blueprint targetting.87 Only send a low volume of notifications about new blueprints
88 registered, blueprints accepted or blueprint targetting.
84 """)89 """)
8590
86 METADATA = DBItem(30, """91 METADATA = DBItem(30, """
87 Details92 Details
8893
89 Send blueprint lifecycle notifications, as well as notifications about changes to the blueprints's details like status and description.94 Send blueprint lifecycle notifications, as well as notifications about
95 changes to the blueprints's details like status and description.
90 """)96 """)
9197
9298
@@ -105,7 +111,7 @@
105 title=_('Distribution series'), required=False, readonly=True)111 title=_('Distribution series'), required=False, readonly=True)
106 sourcepackagename = Int(112 sourcepackagename = Int(
107 title=_('Source package name'), required=False, readonly=True)113 title=_('Source package name'), required=False, readonly=True)
108 subscriber = exported(ParticipatingPersonChoice(114 subscriber = exported(PersonChoice(
109 title=_('Subscriber'), required=True, vocabulary='ValidPersonOrTeam',115 title=_('Subscriber'), required=True, vocabulary='ValidPersonOrTeam',
110 readonly=True, description=_("The person subscribed.")))116 readonly=True, description=_("The person subscribed.")))
111 subscribed_by = exported(PublicPersonChoice(117 subscribed_by = exported(PublicPersonChoice(
112118
=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py 2010-06-29 10:17:06 +0000
+++ lib/lp/registry/model/distribution.py 2010-07-29 20:21:16 +0000
@@ -108,7 +108,7 @@
108from canonical.launchpad.validators.name import sanitize_name, valid_name108from canonical.launchpad.validators.name import sanitize_name, valid_name
109from canonical.launchpad.webapp.interfaces import NotFoundError109from canonical.launchpad.webapp.interfaces import NotFoundError
110from lp.registry.interfaces.person import (110from lp.registry.interfaces.person import (
111 validate_person_not_private_membership, validate_public_person)111 validate_person, validate_public_person)
112from canonical.launchpad.webapp.url import urlparse112from canonical.launchpad.webapp.url import urlparse
113113
114from lp.answers.model.question import (114from lp.answers.model.question import (
@@ -152,7 +152,7 @@
152 storm_validator=validate_public_person, notNull=True)152 storm_validator=validate_public_person, notNull=True)
153 bug_supervisor = ForeignKey(153 bug_supervisor = ForeignKey(
154 dbName='bug_supervisor', foreignKey='Person',154 dbName='bug_supervisor', foreignKey='Person',
155 storm_validator=validate_person_not_private_membership,155 storm_validator=validate_person,
156 notNull=False,156 notNull=False,
157 default=None)157 default=None)
158 bug_reporting_guidelines = StringCol(default=None)158 bug_reporting_guidelines = StringCol(default=None)
@@ -774,7 +774,7 @@
774774
775 def getSeriesByStatus(self, status):775 def getSeriesByStatus(self, status):
776 """See `IDistribution`."""776 """See `IDistribution`."""
777 return Store.of(self).find(DistroSeries, 777 return Store.of(self).find(DistroSeries,
778 DistroSeries.distribution == self,778 DistroSeries.distribution == self,
779 DistroSeries.status == status)779 DistroSeries.status == status)
780780
781781
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2010-07-24 00:39:29 +0000
+++ lib/lp/registry/model/person.py 2010-07-29 20:21:16 +0000
@@ -191,17 +191,10 @@
191def validate_person_visibility(person, attr, value):191def validate_person_visibility(person, attr, value):
192 """Validate changes in visibility.192 """Validate changes in visibility.
193193
194 * Prevent teams with inconsistent connections from being made private194 * Prevent teams with inconsistent connections from being made private.
195 * Prevent private membership teams with mailing lists from going public.
196 * Prevent private teams from any transition.195 * Prevent private teams from any transition.
197 """196 """
198197
199 # XXX: BradCrittenden 2010-07-12 bug=602773: Private membership teams are
200 # deprecated and new ones may not be created.
201 if value == PersonVisibility.PRIVATE_MEMBERSHIP:
202 raise AssertionError(
203 "Private membership teams are deprecated.")
204
205 # Prohibit any visibility changes for private teams. This rule is198 # Prohibit any visibility changes for private teams. This rule is
206 # recognized to be Draconian and may be relaxed in the future.199 # recognized to be Draconian and may be relaxed in the future.
207 if person.visibility == PersonVisibility.PRIVATE:200 if person.visibility == PersonVisibility.PRIVATE:
208201
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2010-07-09 10:22:32 +0000
+++ lib/lp/registry/model/product.py 2010-07-29 20:21:16 +0000
@@ -58,7 +58,7 @@
58from lp.registry.model.milestone import (58from lp.registry.model.milestone import (
59 HasMilestonesMixin, Milestone)59 HasMilestonesMixin, Milestone)
60from lp.registry.interfaces.person import (60from lp.registry.interfaces.person import (
61 validate_person_not_private_membership, validate_public_person)61 validate_person, validate_public_person)
62from lp.registry.model.announcement import MakesAnnouncements62from lp.registry.model.announcement import MakesAnnouncements
63from lp.registry.model.packaging import Packaging63from lp.registry.model.packaging import Packaging
64from lp.registry.model.pillar import HasAliasMixin64from lp.registry.model.pillar import HasAliasMixin
@@ -78,10 +78,8 @@
78 HasTranslationImportsMixin)78 HasTranslationImportsMixin)
79from lp.registry.model.structuralsubscription import (79from lp.registry.model.structuralsubscription import (
80 StructuralSubscriptionTargetMixin)80 StructuralSubscriptionTargetMixin)
81from canonical.launchpad.helpers import shortlist
8281
83from lp.code.interfaces.branch import (82from lp.code.interfaces.branch import DEFAULT_BRANCH_STATUS_IN_LISTING
84 DEFAULT_BRANCH_STATUS_IN_LISTING, IBranchSet)
85from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor83from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
86from canonical.launchpad.interfaces.launchpad import (84from canonical.launchpad.interfaces.launchpad import (
87 IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage,85 IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage,
@@ -189,7 +187,7 @@
189 default=None)187 default=None)
190 _owner = ForeignKey(188 _owner = ForeignKey(
191 dbName="owner", foreignKey="Person",189 dbName="owner", foreignKey="Person",
192 storm_validator=validate_person_not_private_membership,190 storm_validator=validate_person,
193 notNull=True)191 notNull=True)
194 registrant = ForeignKey(192 registrant = ForeignKey(
195 dbName="registrant", foreignKey="Person",193 dbName="registrant", foreignKey="Person",
@@ -197,7 +195,7 @@
197 notNull=True)195 notNull=True)
198 bug_supervisor = ForeignKey(196 bug_supervisor = ForeignKey(
199 dbName='bug_supervisor', foreignKey='Person',197 dbName='bug_supervisor', foreignKey='Person',
200 storm_validator=validate_person_not_private_membership,198 storm_validator=validate_person,
201 notNull=False,199 notNull=False,
202 default=None)200 default=None)
203 security_contact = ForeignKey(201 security_contact = ForeignKey(
@@ -206,7 +204,7 @@
206 default=None)204 default=None)
207 driver = ForeignKey(205 driver = ForeignKey(
208 dbName="driver", foreignKey="Person",206 dbName="driver", foreignKey="Person",
209 storm_validator=validate_person_not_private_membership,207 storm_validator=validate_person,
210 notNull=False, default=None)208 notNull=False, default=None)
211 name = StringCol(209 name = StringCol(
212 dbName='name', notNull=True, alternateID=True, unique=True)210 dbName='name', notNull=True, alternateID=True, unique=True)
213211
=== modified file 'lib/lp/registry/model/productrelease.py'
--- lib/lp/registry/model/productrelease.py 2009-11-24 21:27:17 +0000
+++ lib/lp/registry/model/productrelease.py 2010-07-29 20:21:16 +0000
@@ -31,7 +31,7 @@
31 UpstreamFileType)31 UpstreamFileType)
32from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet32from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
33from lp.registry.interfaces.person import (33from lp.registry.interfaces.person import (
34 validate_person_not_private_membership, validate_public_person)34 validate_person, validate_public_person)
35from canonical.launchpad.webapp.interfaces import (35from canonical.launchpad.webapp.interfaces import (
36 DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE)36 DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE)
3737
@@ -52,7 +52,7 @@
52 dbName='datecreated', notNull=True, default=UTC_NOW)52 dbName='datecreated', notNull=True, default=UTC_NOW)
53 owner = ForeignKey(53 owner = ForeignKey(
54 dbName="owner", foreignKey="Person",54 dbName="owner", foreignKey="Person",
55 storm_validator=validate_person_not_private_membership,55 storm_validator=validate_person,
56 notNull=True)56 notNull=True)
57 milestone = ForeignKey(dbName='milestone', foreignKey='Milestone')57 milestone = ForeignKey(dbName='milestone', foreignKey='Milestone')
5858
5959
=== modified file 'lib/lp/registry/model/productseries.py'
--- lib/lp/registry/model/productseries.py 2010-07-24 11:31:11 +0000
+++ lib/lp/registry/model/productseries.py 2010-07-29 20:21:16 +0000
@@ -35,8 +35,7 @@
35from lp.registry.model.milestone import (35from lp.registry.model.milestone import (
36 HasMilestonesMixin, Milestone)36 HasMilestonesMixin, Milestone)
37from lp.registry.model.packaging import Packaging37from lp.registry.model.packaging import Packaging
38from lp.registry.interfaces.person import (38from lp.registry.interfaces.person import validate_person
39 validate_person_not_private_membership)
40from lp.translations.model.pofile import POFile39from lp.translations.model.pofile import POFile
41from lp.translations.model.potemplate import (40from lp.translations.model.potemplate import (
42 HasTranslationTemplatesMixin,41 HasTranslationTemplatesMixin,
@@ -95,12 +94,12 @@
95 datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)94 datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)
96 owner = ForeignKey(95 owner = ForeignKey(
97 dbName="owner", foreignKey="Person",96 dbName="owner", foreignKey="Person",
98 storm_validator=validate_person_not_private_membership,97 storm_validator=validate_person,
99 notNull=True)98 notNull=True)
10099
101 driver = ForeignKey(100 driver = ForeignKey(
102 dbName="driver", foreignKey="Person",101 dbName="driver", foreignKey="Person",
103 storm_validator=validate_person_not_private_membership,102 storm_validator=validate_person,
104 notNull=False, default=None)103 notNull=False, default=None)
105 branch = ForeignKey(foreignKey='Branch', dbName='branch',104 branch = ForeignKey(foreignKey='Branch', dbName='branch',
106 default=None)105 default=None)
107106
=== modified file 'lib/lp/registry/model/structuralsubscription.py'
--- lib/lp/registry/model/structuralsubscription.py 2010-04-19 09:39:29 +0000
+++ lib/lp/registry/model/structuralsubscription.py 2010-07-29 20:21:16 +0000
@@ -29,7 +29,7 @@
29 IStructuralSubscription, IStructuralSubscriptionTarget,29 IStructuralSubscription, IStructuralSubscriptionTarget,
30 UserCannotSubscribePerson)30 UserCannotSubscribePerson)
31from lp.registry.interfaces.person import (31from lp.registry.interfaces.person import (
32 validate_public_person, validate_person_not_private_membership)32 validate_person, validate_public_person)
3333
3434
35class StructuralSubscription(SQLBase):35class StructuralSubscription(SQLBase):
@@ -61,7 +61,7 @@
61 notNull=False, default=None)61 notNull=False, default=None)
62 subscriber = ForeignKey(62 subscriber = ForeignKey(
63 dbName='subscriber', foreignKey='Person',63 dbName='subscriber', foreignKey='Person',
64 storm_validator=validate_person_not_private_membership, notNull=True)64 storm_validator=validate_person, notNull=True)
65 subscribed_by = ForeignKey(65 subscribed_by = ForeignKey(
66 dbName='subscribed_by', foreignKey='Person',66 dbName='subscribed_by', foreignKey='Person',
67 storm_validator=validate_public_person, notNull=True)67 storm_validator=validate_public_person, notNull=True)
@@ -105,11 +105,12 @@
105 elif self.distroseries is not None:105 elif self.distroseries is not None:
106 return self.distroseries106 return self.distroseries
107 else:107 else:
108 raise AssertionError, 'StructuralSubscription has no target.'108 raise AssertionError('StructuralSubscription has no target.')
109109
110110
111class StructuralSubscriptionTargetMixin:111class StructuralSubscriptionTargetMixin:
112 """Mixin class for implementing `IStructuralSubscriptionTarget`."""112 """Mixin class for implementing `IStructuralSubscriptionTarget`."""
113
113 @property114 @property
114 def _target_args(self):115 def _target_args(self):
115 """Target Arguments.116 """Target Arguments.
116117
=== modified file 'lib/lp/registry/tests/mailinglists_helper.py'
--- lib/lp/registry/tests/mailinglists_helper.py 2009-12-04 17:16:39 +0000
+++ lib/lp/registry/tests/mailinglists_helper.py 2010-07-29 20:21:16 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Helper functions for testing XML-RPC services."""4"""Helper functions for testing XML-RPC services."""
@@ -45,6 +45,7 @@
45 used which prints faults to match the output of ServerProxy (proper45 used which prints faults to match the output of ServerProxy (proper
46 exceptions aren't really necessary).46 exceptions aren't really necessary).
47 """47 """
48
48 def caller(self, *args, **kws):49 def caller(self, *args, **kws):
49 result = func(self, *args, **kws)50 result = func(self, *args, **kws)
50 if isinstance(result, xmlrpclib.Fault):51 if isinstance(result, xmlrpclib.Fault):
@@ -194,7 +195,7 @@
194 browser.getControl(name='field.name').value = team_name195 browser.getControl(name='field.name').value = team_name
195 browser.getControl('Display Name').value = displayname196 browser.getControl('Display Name').value = displayname
196 if private:197 if private:
197 browser.getControl('Visibility').value = ['PRIVATE_MEMBERSHIP']198 browser.getControl('Visibility').value = ['PRIVATE']
198 browser.getControl(name='field.subscriptionpolicy').value = [199 browser.getControl(name='field.subscriptionpolicy').value = [
199 'RESTRICTED']200 'RESTRICTED']
200 else:201 else:
201202
=== modified file 'lib/lp/registry/tests/test_person.py'
--- lib/lp/registry/tests/test_person.py 2010-07-14 16:08:24 +0000
+++ lib/lp/registry/tests/test_person.py 2010-07-29 20:21:16 +0000
@@ -26,7 +26,7 @@
26from lp.registry.interfaces.person import (26from lp.registry.interfaces.person import (
27 IPersonSet, ImmutableVisibilityError, NameAlreadyTaken,27 IPersonSet, ImmutableVisibilityError, NameAlreadyTaken,
28 PersonCreationRationale, PersonVisibility)28 PersonCreationRationale, PersonVisibility)
29from canonical.launchpad.database import Bug, BugTask, BugSubscription29from canonical.launchpad.database import Bug
30from lp.registry.model.structuralsubscription import (30from lp.registry.model.structuralsubscription import (
31 StructuralSubscription)31 StructuralSubscription)
32from lp.registry.model.karma import KarmaCategory32from lp.registry.model.karma import KarmaCategory
@@ -115,19 +115,6 @@
115 PrivatePersonLinkageError,115 PrivatePersonLinkageError,
116 setattr, bug, attr_name, self.myteam)116 setattr, bug, attr_name, self.myteam)
117117
118 def test_BugTask_person_validator(self):
119 bug_task = BugTask.select(limit=1)[0]
120 for attr_name in ['assignee', 'owner']:
121 self.assertRaises(
122 PrivatePersonLinkageError,
123 setattr, bug_task, attr_name, self.myteam)
124
125 def test_BugSubscription_person_validator(self):
126 bug_subscription = BugSubscription.select(limit=1)[0]
127 self.assertRaises(
128 PrivatePersonLinkageError,
129 setattr, bug_subscription, 'person', self.myteam)
130
131 def test_Specification_person_validator(self):118 def test_Specification_person_validator(self):
132 specification = Specification.select(limit=1)[0]119 specification = Specification.select(limit=1)[0]
133 for attr_name in ['assignee', 'drafter', 'approver', 'owner',120 for attr_name in ['assignee', 'drafter', 'approver', 'owner',
134121
=== modified file 'lib/lp/registry/tests/test_user_vocabularies.py'
--- lib/lp/registry/tests/test_user_vocabularies.py 2010-07-14 14:35:59 +0000
+++ lib/lp/registry/tests/test_user_vocabularies.py 2010-07-29 20:21:16 +0000
@@ -127,7 +127,7 @@
127 login_person(team_owner)127 login_person(team_owner)
128 team = self.factory.makeTeam(owner=team_owner)128 team = self.factory.makeTeam(owner=team_owner)
129 team.addMember(person=user, reviewer=team_owner)129 team.addMember(person=user, reviewer=team_owner)
130 # Launchpad admin rights are needed to set private membership.130 # Launchpad admin rights are needed to create private teams.
131 login('foo.bar@canonical.com')131 login('foo.bar@canonical.com')
132 team.visibility = PersonVisibility.PRIVATE132 team.visibility = PersonVisibility.PRIVATE
133 login_person(user)133 login_person(user)
134134
=== 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-29 20:21:16 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Vocabularies for content objects.4"""Vocabularies for content objects.
@@ -441,9 +441,7 @@
441 # visible.441 # visible.
442 private_query = AND(442 private_query = AND(
443 Not(Person.teamowner == None),443 Not(Person.teamowner == None),
444 OR(444 Person.visibility == PersonVisibility.PRIVATE)
445 Person.visibility == PersonVisibility.PRIVATE,
446 Person.visibility == PersonVisibility.PRIVATE_MEMBERSHIP))
447 else:445 else:
448 private_query = AND(446 private_query = AND(
449 TeamParticipation.person == logged_in_user.id,447 TeamParticipation.person == logged_in_user.id,
450448
=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py 2010-07-20 10:25:51 +0000
+++ lib/lp/soyuz/browser/archive.py 2010-07-29 20:21:16 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Browser views for archive."""4"""Browser views for archive."""
@@ -292,6 +292,7 @@
292 user.item292 user.item
293 where item is a component or a source package name,293 where item is a component or a source package name,
294 """294 """
295
295 def get_url_param(param_name):296 def get_url_param(param_name):
296 """Return the URL parameter with the given name or None."""297 """Return the URL parameter with the given name or None."""
297 param_seq = self.request.query_string_params.get(param_name)298 param_seq = self.request.query_string_params.get(param_name)
@@ -371,6 +372,7 @@
371372
372373
373class ArchiveMenuMixin:374class ArchiveMenuMixin:
375
374 def ppa(self):376 def ppa(self):
375 text = 'View PPA'377 text = 'View PPA'
376 return Link(canonical_url(self.context), text, icon='info')378 return Link(canonical_url(self.context), text, icon='info')
@@ -522,6 +524,7 @@
522 @cachedproperty524 @cachedproperty
523 def repository_usage(self):525 def repository_usage(self):
524 """Return a dictionary with usage details of this repository."""526 """Return a dictionary with usage details of this repository."""
527
525 def package_plural(control):528 def package_plural(control):
526 if control == 1:529 if control == 1:
527 return 'package'530 return 'package'
@@ -629,7 +632,6 @@
629 IPackageCopyRequestSet).getByTargetArchive(self.context)632 IPackageCopyRequestSet).getByTargetArchive(self.context)
630 return list(copy_requests)633 return list(copy_requests)
631634
632
633 @property635 @property
634 def disabled_warning_message(self):636 def disabled_warning_message(self):
635 """Return an appropriate message if the archive is disabled."""637 """Return an appropriate message if the archive is disabled."""
@@ -737,7 +739,7 @@
737 # If the request included a filter, try to use it - if it's739 # If the request included a filter, try to use it - if it's
738 # invalid we use the default instead.740 # invalid we use the default instead.
739 vocab = self.widgets[filter_name].vocabulary741 vocab = self.widgets[filter_name].vocabulary
740 if vocab.by_token.has_key(requested_filter[0]):742 if requested_filter[0] in vocab.by_token:
741 return vocab.getTermByToken(requested_filter[0]).value743 return vocab.getTermByToken(requested_filter[0]).value
742 else:744 else:
743 return getattr(self, default_filter_attr)745 return getattr(self, default_filter_attr)
@@ -1160,6 +1162,7 @@
11601162
1161 self.setNextURL()1163 self.setNextURL()
11621164
1165
1163class DestinationArchiveDropdownWidget(LaunchpadDropdownWidget):1166class DestinationArchiveDropdownWidget(LaunchpadDropdownWidget):
1164 """Redefining default display value as 'This PPA'."""1167 """Redefining default display value as 'This PPA'."""
1165 _messageNoValue = _("vocabulary-copy-to-context-ppa", "This PPA")1168 _messageNoValue = _("vocabulary-copy-to-context-ppa", "This PPA")
@@ -1809,8 +1812,7 @@
1809 def is_private_team(self):1812 def is_private_team(self):
1810 """Is the person a private team?1813 """Is the person a private team?
18111814
1812 :return: True only if visibility is PRIVATE. False is returned when1815 :return: True only if visibility is PRIVATE.
1813 the visibility is PUBLIC and PRIVATE_MEMBERSHIP.
1814 :rtype: bool1816 :rtype: bool
1815 """1817 """
1816 return self.context.visibility == PersonVisibility.PRIVATE1818 return self.context.visibility == PersonVisibility.PRIVATE
@@ -1861,6 +1863,7 @@
1861 """Default save validation does nothing."""1863 """Default save validation does nothing."""
1862 pass1864 pass
18631865
1866
1864class ArchiveEditView(BaseArchiveEditView):1867class ArchiveEditView(BaseArchiveEditView):
18651868
1866 field_names = ['displayname', 'description', 'enabled', 'publish']1869 field_names = ['displayname', 'description', 'enabled', 'publish']
@@ -1881,7 +1884,7 @@
1881 def updateContextFromData(self, data):1884 def updateContextFromData(self, data):
1882 """Update context from form data.1885 """Update context from form data.
18831886
1884 If the user did not specify a buildd secret but marked the 1887 If the user did not specify a buildd secret but marked the
1885 archive as private, generate a secret for them.1888 archive as private, generate a secret for them.
1886 """1889 """
1887 if data['private'] and data['buildd_secret'] is None:1890 if data['private'] and data['buildd_secret'] is None:
@@ -1958,8 +1961,7 @@
1958 def owner_is_private_team(self):1961 def owner_is_private_team(self):
1959 """Is the owner a private team?1962 """Is the owner a private team?
19601963
1961 :return: True only if visibility is PRIVATE. False is returned when1964 :return: True only if visibility is PRIVATE.
1962 the visibility is PUBLIC and PRIVATE_MEMBERSHIP.
1963 :rtype: bool1965 :rtype: bool
1964 """1966 """
1965 return self.context.owner.visibility == PersonVisibility.PRIVATE1967 return self.context.owner.visibility == PersonVisibility.PRIVATE
@@ -2028,4 +2030,3 @@
2028 self.request.response.addInfoNotification(2030 self.request.response.addInfoNotification(
2029 "Deletion of '%s' has been requested and the repository will be "2031 "Deletion of '%s' has been requested and the repository will be "
2030 "removed shortly." % self.context.title)2032 "removed shortly." % self.context.title)
2031
20322033
=== modified file 'lib/lp/soyuz/browser/archivesubscription.py'
--- lib/lp/soyuz/browser/archivesubscription.py 2010-03-08 18:01:33 +0000
+++ lib/lp/soyuz/browser/archivesubscription.py 2010-07-29 20:21:16 +0000
@@ -11,7 +11,7 @@
11 'ArchiveSubscribersView',11 'ArchiveSubscribersView',
12 'PersonArchiveSubscriptionView',12 'PersonArchiveSubscriptionView',
13 'PersonArchiveSubscriptionsView',13 'PersonArchiveSubscriptionsView',
14 'traverse_archive_subscription_for_subscriber'14 'traverse_archive_subscription_for_subscriber',
15 ]15 ]
1616
17import datetime17import datetime
@@ -27,7 +27,7 @@
2727
28from canonical.cachedproperty import cachedproperty28from canonical.cachedproperty import cachedproperty
29from canonical.launchpad import _29from canonical.launchpad import _
30from canonical.launchpad.fields import ParticipatingPersonChoice30from canonical.launchpad.fields import PersonChoice
31from lp.soyuz.browser.sourceslist import (31from lp.soyuz.browser.sourceslist import (
32 SourcesListEntries, SourcesListEntriesView)32 SourcesListEntries, SourcesListEntriesView)
33from lp.soyuz.interfaces.archive import IArchiveSet33from lp.soyuz.interfaces.archive import IArchiveSet
@@ -93,7 +93,7 @@
93 we simply want to use a date field when users create or edit new93 we simply want to use a date field when users create or edit new
94 subscriptions.94 subscriptions.
95 """95 """
96 subscriber = ParticipatingPersonChoice(96 subscriber = PersonChoice(
97 title=_("Subscriber"), required=True, vocabulary='ValidPersonOrTeam',97 title=_("Subscriber"), required=True, vocabulary='ValidPersonOrTeam',
98 description=_("The person or team to grant access."))98 description=_("The person or team to grant access."))
9999
@@ -383,6 +383,3 @@
383 token_set = getUtility(IArchiveAuthTokenSet)383 token_set = getUtility(IArchiveAuthTokenSet)
384 return token_set.getActiveTokenForArchiveAndPerson(384 return token_set.getActiveTokenForArchiveAndPerson(
385 self.context.archive, self.context.subscriber)385 self.context.archive, self.context.subscriber)
386
387
388
389386
=== modified file 'lib/lp/soyuz/interfaces/archive.py'
--- lib/lp/soyuz/interfaces/archive.py 2010-07-27 12:28:46 +0000
+++ lib/lp/soyuz/interfaces/archive.py 2010-07-29 20:21:16 +0000
@@ -53,7 +53,7 @@
5353
54from canonical.launchpad import _54from canonical.launchpad import _
55from canonical.launchpad.fields import (55from canonical.launchpad.fields import (
56 ParticipatingPersonChoice, PublicPersonChoice, StrippedTextLine)56 PersonChoice, PublicPersonChoice, StrippedTextLine)
57from canonical.launchpad.interfaces.launchpad import IPrivacy57from canonical.launchpad.interfaces.launchpad import IPrivacy
58from lp.registry.interfaces.role import IHasOwner58from lp.registry.interfaces.role import IHasOwner
59from lp.soyuz.interfaces.buildrecords import IHasBuildRecords59from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
@@ -227,7 +227,7 @@
227 id = Attribute("The archive ID.")227 id = Attribute("The archive ID.")
228228
229 owner = exported(229 owner = exported(
230 ParticipatingPersonChoice(230 PersonChoice(
231 title=_('Owner'), required=True, vocabulary='ValidOwner',231 title=_('Owner'), required=True, vocabulary='ValidOwner',
232 description=_("""The archive owner.""")))232 description=_("""The archive owner.""")))
233233
@@ -567,17 +567,18 @@
567 distroseries, strict_component=True):567 distroseries, strict_component=True):
568 """Can 'person' upload 'sourcepackagename' to this archive ?568 """Can 'person' upload 'sourcepackagename' to this archive ?
569569
570 :param person: The `IPerson` trying to upload to the package. Referred to570 :param person: The `IPerson` trying to upload to the package. Referred
571 as 'the signer' in upload code.571 to as 'the signer' in upload code.
572 :param sourcepackagename: The source package being uploaded. None if the572 :param sourcepackagename: The source package being uploaded. None if
573 package is new.573 the package is new.
574 :param archive: The `IArchive` being uploaded to.574 :param archive: The `IArchive` being uploaded to.
575 :param component: The `IComponent` that the source package belongs to.575 :param component: The `IComponent` that the source package belongs to.
576 :param distroseries: The upload's target distro series.576 :param distroseries: The upload's target distro series.
577 :param strict_component: True if access to the specific component for the577 :param strict_component: True if access to the specific component for
578 package is needed to upload to it. If False, then access to any578 the package is needed to upload to it. If False, then access to
579 package will do.579 any package will do.
580 :return: CannotUploadToArchive if 'person' cannot upload to the archive,580 :return: CannotUploadToArchive if 'person' cannot upload to the
581 archive,
581 None otherwise.582 None otherwise.
582 """583 """
583584
584585
=== modified file 'lib/lp/soyuz/interfaces/archivesubscriber.py'
--- lib/lp/soyuz/interfaces/archivesubscriber.py 2009-09-11 10:52:54 +0000
+++ lib/lp/soyuz/interfaces/archivesubscriber.py 2010-07-29 20:21:16 +0000
@@ -20,7 +20,7 @@
20from lazr.enum import DBEnumeratedType, DBItem20from lazr.enum import DBEnumeratedType, DBItem
2121
22from canonical.launchpad import _22from canonical.launchpad import _
23from canonical.launchpad.fields import ParticipatingPersonChoice23from canonical.launchpad.fields import PersonChoice
24from lp.soyuz.interfaces.archive import IArchive24from lp.soyuz.interfaces.archive import IArchive
25from lp.registry.interfaces.person import IPerson25from lp.registry.interfaces.person import IPerson
26from lazr.restful.declarations import export_as_webservice_entry, exported26from lazr.restful.declarations import export_as_webservice_entry, exported
@@ -71,7 +71,7 @@
71 title=_("Date Created"), required=True, readonly=True,71 title=_("Date Created"), required=True, readonly=True,
72 description=_("The timestamp when the subscription was created.")))72 description=_("The timestamp when the subscription was created.")))
7373
74 subscriber = exported(ParticipatingPersonChoice(74 subscriber = exported(PersonChoice(
75 title=_("Subscriber"), required=True, readonly=True,75 title=_("Subscriber"), required=True, readonly=True,
76 vocabulary='ValidPersonOrTeam',76 vocabulary='ValidPersonOrTeam',
77 description=_("The person who is subscribed.")))77 description=_("The person who is subscribed.")))
7878
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2010-07-27 12:53:24 +0000
+++ lib/lp/soyuz/model/archive.py 2010-07-29 20:21:16 +0000
@@ -102,8 +102,7 @@
102 IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)102 IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
103from canonical.launchpad.webapp.url import urlappend103from canonical.launchpad.webapp.url import urlappend
104from canonical.launchpad.validators.name import valid_name104from canonical.launchpad.validators.name import valid_name
105from lp.registry.interfaces.person import (105from lp.registry.interfaces.person import validate_person
106 validate_person_not_private_membership)
107106
108107
109class Archive(SQLBase):108class Archive(SQLBase):
@@ -113,7 +112,7 @@
113112
114 owner = ForeignKey(113 owner = ForeignKey(
115 dbName='owner', foreignKey='Person',114 dbName='owner', foreignKey='Person',
116 storm_validator=validate_person_not_private_membership, notNull=True)115 storm_validator=validate_person, notNull=True)
117116
118 def _validate_archive_name(self, attr, value):117 def _validate_archive_name(self, attr, value):
119 """Only allow renaming of COPY archives.118 """Only allow renaming of COPY archives.
120119
=== modified file 'lib/lp/soyuz/model/archivesubscriber.py'
--- lib/lp/soyuz/model/archivesubscriber.py 2009-12-24 06:44:57 +0000
+++ lib/lp/soyuz/model/archivesubscriber.py 2010-07-29 20:21:16 +0000
@@ -22,8 +22,7 @@
22from canonical.database.enumcol import DBEnum22from canonical.database.enumcol import DBEnum
23from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet23from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
24from lp.soyuz.model.archiveauthtoken import ArchiveAuthToken24from lp.soyuz.model.archiveauthtoken import ArchiveAuthToken
25from lp.registry.interfaces.person import (25from lp.registry.interfaces.person import validate_person
26 validate_person_not_private_membership)
27from lp.registry.model.teammembership import TeamParticipation26from lp.registry.model.teammembership import TeamParticipation
28from lp.soyuz.interfaces.archivesubscriber import (27from lp.soyuz.interfaces.archivesubscriber import (
29 ArchiveSubscriberStatus, IArchiveSubscriber)28 ArchiveSubscriberStatus, IArchiveSubscriber)
@@ -47,7 +46,7 @@
4746
48 subscriber_id = Int(47 subscriber_id = Int(
49 name='subscriber', allow_none=False,48 name='subscriber', allow_none=False,
50 validator=validate_person_not_private_membership)49 validator=validate_person)
51 subscriber = Reference(subscriber_id, 'Person.id')50 subscriber = Reference(subscriber_id, 'Person.id')
5251
53 date_expires = DateTime(52 date_expires = DateTime(
5453
=== modified file 'lib/lp/translations/interfaces/potemplate.py'
--- lib/lp/translations/interfaces/potemplate.py 2010-07-29 13:45:00 +0000
+++ lib/lp/translations/interfaces/potemplate.py 2010-07-29 20:21:16 +0000
@@ -12,7 +12,7 @@
12 exported, export_as_webservice_entry, export_read_operation,12 exported, export_as_webservice_entry, export_read_operation,
13 operation_returns_collection_of)13 operation_returns_collection_of)
1414
15from canonical.launchpad.fields import ParticipatingPersonChoice15from canonical.launchpad.fields import PersonChoice
16from canonical.launchpad.interfaces.launchpad import NotFoundError16from canonical.launchpad.interfaces.launchpad import NotFoundError
17from canonical.launchpad.interfaces.librarian import ILibraryFileAlias17from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
18from lp.registry.interfaces.distribution import IDistribution18from lp.registry.interfaces.distribution import IDistribution
@@ -124,7 +124,7 @@
124 required=True,124 required=True,
125 default=True), exported_as='active')125 default=True), exported_as='active')
126126
127 owner = exported(ParticipatingPersonChoice(127 owner = exported(PersonChoice(
128 title=_("Owner"),128 title=_("Owner"),
129 required=True,129 required=True,
130 description=_(130 description=_(
131131
=== modified file 'lib/lp/translations/interfaces/translationimportqueue.py'
--- lib/lp/translations/interfaces/translationimportqueue.py 2010-06-04 07:29:20 +0000
+++ lib/lp/translations/interfaces/translationimportqueue.py 2010-07-29 20:21:16 +0000
@@ -12,7 +12,7 @@
12from lazr.enum import DBEnumeratedType, DBItem, EnumeratedType, Item12from lazr.enum import DBEnumeratedType, DBItem, EnumeratedType, Item
1313
14from canonical.launchpad import _14from canonical.launchpad import _
15from canonical.launchpad.fields import ParticipatingPersonChoice15from canonical.launchpad.fields import PersonChoice
16from lp.registry.interfaces.sourcepackage import ISourcePackage16from lp.registry.interfaces.sourcepackage import ISourcePackage
17from lp.translations.interfaces.translationfileformat import (17from lp.translations.interfaces.translationfileformat import (
18 TranslationFileFormat)18 TranslationFileFormat)
@@ -189,7 +189,7 @@
189 required=True))189 required=True))
190190
191 importer = exported(191 importer = exported(
192 ParticipatingPersonChoice(192 PersonChoice(
193 title=_("Uploader"),193 title=_("Uploader"),
194 required=True,194 required=True,
195 readonly=True,195 readonly=True,
196196
=== modified file 'lib/lp/translations/model/translationimportqueue.py'
--- lib/lp/translations/model/translationimportqueue.py 2010-07-23 14:50:50 +0000
+++ lib/lp/translations/model/translationimportqueue.py 2010-07-29 20:21:16 +0000
@@ -40,7 +40,7 @@
40from lp.registry.interfaces.series import SeriesStatus40from lp.registry.interfaces.series import SeriesStatus
41from lp.registry.interfaces.distroseries import IDistroSeries41from lp.registry.interfaces.distroseries import IDistroSeries
42from lp.registry.interfaces.person import (42from lp.registry.interfaces.person import (
43 IPerson, validate_person_not_private_membership)43 IPerson, validate_person)
44from lp.registry.interfaces.product import IProduct44from lp.registry.interfaces.product import IProduct
45from lp.registry.interfaces.productseries import IProductSeries45from lp.registry.interfaces.productseries import IProductSeries
46from lp.registry.interfaces.sourcepackage import ISourcePackage46from lp.registry.interfaces.sourcepackage import ISourcePackage
@@ -115,7 +115,7 @@
115 notNull=False)115 notNull=False)
116 importer = ForeignKey(116 importer = ForeignKey(
117 dbName='importer', foreignKey='Person',117 dbName='importer', foreignKey='Person',
118 storm_validator=validate_person_not_private_membership,118 storm_validator=validate_person,
119 notNull=True)119 notNull=True)
120 dateimported = UtcDateTimeCol(dbName='dateimported', notNull=True,120 dateimported = UtcDateTimeCol(dbName='dateimported', notNull=True,
121 default=DEFAULT)121 default=DEFAULT)

Subscribers

People subscribed via source and target branches

to status/vote changes: