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