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
=== modified file 'lib/canonical/launchpad/security.py'
--- lib/canonical/launchpad/security.py 2010-05-17 12:43:53 +0000
+++ lib/canonical/launchpad/security.py 2010-05-25 04:43:25 +0000
@@ -1124,7 +1124,7 @@
1124class EditCodeImportMachine(OnlyBazaarExpertsAndAdmins):1124class EditCodeImportMachine(OnlyBazaarExpertsAndAdmins):
1125 """Control who can edit the object view of a CodeImportMachine.1125 """Control who can edit the object view of a CodeImportMachine.
11261126
1127 Access is restricted to members of ~vcs-imports and Launchpad admins.1127 Access is restricted to members of ~bazaar-experts and Launchpad admins.
1128 """1128 """
1129 permission = 'launchpad.Edit'1129 permission = 'launchpad.Edit'
1130 usedfor = ICodeImportMachine1130 usedfor = ICodeImportMachine
11311131
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py 2010-05-19 22:25:43 +0000
+++ lib/lp/registry/browser/product.py 2010-05-25 04:43:25 +0000
@@ -1851,24 +1851,6 @@
1851 return 'Check for duplicate projects'1851 return 'Check for duplicate projects'
1852 return 'Registration details'1852 return 'Registration details'
18531853
1854 def isVCSImport(self):
1855 """Is the the user vcs-imports."""
1856 if self.user is None:
1857 return False
1858 vcs_imports = getUtility(ILaunchpadCelebrities).vcs_imports
1859 return self.user.inTeam(vcs_imports)
1860
1861 def setUpFields(self):
1862 """See `LaunchpadFormView`."""
1863 super(ProjectAddStepTwo, self).setUpFields()
1864 if not self.isVCSImport():
1865 # vcs-imports members get it easy and are able to change
1866 # the owner and reviewed status during the edit process;
1867 # this saves time wasted on getting to product/+admin.
1868 # The fields are not displayed for other people though.
1869 self.form_fields = self.form_fields.omit(
1870 'owner', 'license_reviewed')
1871
1872 def setUpWidgets(self):1854 def setUpWidgets(self):
1873 """See `LaunchpadFormView`."""1855 """See `LaunchpadFormView`."""
1874 super(ProjectAddStepTwo, self).setUpWidgets()1856 super(ProjectAddStepTwo, self).setUpWidgets()
@@ -1941,14 +1923,6 @@
19411923
1942 def main_action(self, data):1924 def main_action(self, data):
1943 """See `MultiStepView`."""1925 """See `MultiStepView`."""
1944 if not self.isVCSImport():
1945 # Zope makes sure these are never set, since they are not in
1946 # self.form_fields
1947 assert "owner" not in data, 'Unexpected form data'
1948 assert "license_reviewed" not in data, 'Unexpected form data'
1949 data['owner'] = self.user
1950 data['license_reviewed'] = False
1951
1952 self.product = self.create_product(data)1926 self.product = self.create_product(data)
1953 self.notifyCommercialMailingList()1927 self.notifyCommercialMailingList()
1954 notify(ObjectCreatedEvent(self.product))1928 notify(ObjectCreatedEvent(self.product))
19551929
=== modified file 'lib/lp/registry/browser/tests/project-add-views.txt'
--- lib/lp/registry/browser/tests/project-add-views.txt 2010-05-12 19:06:17 +0000
+++ lib/lp/registry/browser/tests/project-add-views.txt 2010-05-25 04:43:25 +0000
@@ -80,12 +80,6 @@
80 >>> view.search_results_count80 >>> view.search_results_count
81 081 0
8282
83The second step's page also includes some special things if the user is in the
84vcs_imports celebrity. Foo Bar is in this team.
85
86 >>> view.isVCSImport()
87 True
88
89The second step also has a iterator over all the search results, of which83The second step also has a iterator over all the search results, of which
90there are currently none.84there are currently none.
9185