Merge lp:~thumper/launchpad/vcs-imports-permission-review into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 10914
Proposed branch: lp:~thumper/launchpad/vcs-imports-permission-review
Merge into: lp:launchpad
Diff against target: 72 lines (+1/-33)
3 files modified
lib/canonical/launchpad/security.py (+1/-1)
lib/lp/registry/browser/product.py (+0/-26)
lib/lp/registry/browser/tests/project-add-views.txt (+0/-6)
To merge this branch: bzr merge lp:~thumper/launchpad/vcs-imports-permission-review
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+25867@code.launchpad.net

Commit message

Remove some more obsolete vcs-imports special cases.

Description of the change

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Assuming this code really isn't used, looks fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/security.py'
2--- lib/canonical/launchpad/security.py 2010-05-17 12:43:53 +0000
3+++ lib/canonical/launchpad/security.py 2010-05-25 04:43:25 +0000
4@@ -1124,7 +1124,7 @@
5 class EditCodeImportMachine(OnlyBazaarExpertsAndAdmins):
6 """Control who can edit the object view of a CodeImportMachine.
7
8- Access is restricted to members of ~vcs-imports and Launchpad admins.
9+ Access is restricted to members of ~bazaar-experts and Launchpad admins.
10 """
11 permission = 'launchpad.Edit'
12 usedfor = ICodeImportMachine
13
14=== modified file 'lib/lp/registry/browser/product.py'
15--- lib/lp/registry/browser/product.py 2010-05-19 22:25:43 +0000
16+++ lib/lp/registry/browser/product.py 2010-05-25 04:43:25 +0000
17@@ -1851,24 +1851,6 @@
18 return 'Check for duplicate projects'
19 return 'Registration details'
20
21- def isVCSImport(self):
22- """Is the the user vcs-imports."""
23- if self.user is None:
24- return False
25- vcs_imports = getUtility(ILaunchpadCelebrities).vcs_imports
26- return self.user.inTeam(vcs_imports)
27-
28- def setUpFields(self):
29- """See `LaunchpadFormView`."""
30- super(ProjectAddStepTwo, self).setUpFields()
31- if not self.isVCSImport():
32- # vcs-imports members get it easy and are able to change
33- # the owner and reviewed status during the edit process;
34- # this saves time wasted on getting to product/+admin.
35- # The fields are not displayed for other people though.
36- self.form_fields = self.form_fields.omit(
37- 'owner', 'license_reviewed')
38-
39 def setUpWidgets(self):
40 """See `LaunchpadFormView`."""
41 super(ProjectAddStepTwo, self).setUpWidgets()
42@@ -1941,14 +1923,6 @@
43
44 def main_action(self, data):
45 """See `MultiStepView`."""
46- if not self.isVCSImport():
47- # Zope makes sure these are never set, since they are not in
48- # self.form_fields
49- assert "owner" not in data, 'Unexpected form data'
50- assert "license_reviewed" not in data, 'Unexpected form data'
51- data['owner'] = self.user
52- data['license_reviewed'] = False
53-
54 self.product = self.create_product(data)
55 self.notifyCommercialMailingList()
56 notify(ObjectCreatedEvent(self.product))
57
58=== modified file 'lib/lp/registry/browser/tests/project-add-views.txt'
59--- lib/lp/registry/browser/tests/project-add-views.txt 2010-05-12 19:06:17 +0000
60+++ lib/lp/registry/browser/tests/project-add-views.txt 2010-05-25 04:43:25 +0000
61@@ -80,12 +80,6 @@
62 >>> view.search_results_count
63 0
64
65-The second step's page also includes some special things if the user is in the
66-vcs_imports celebrity. Foo Bar is in this team.
67-
68- >>> view.isVCSImport()
69- True
70-
71 The second step also has a iterator over all the search results, of which
72 there are currently none.
73