Merge lp:~bac/launchpad/bug-662994 into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Graham Binns on 2010-12-14 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 12076 | ||||
| Proposed branch: | lp:~bac/launchpad/bug-662994 | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
410 lines (+176/-68) 7 files modified
lib/lp/registry/browser/project.py (+5/-3) lib/lp/registry/browser/tests/test_projectgroup.py (+84/-0) lib/lp/registry/interfaces/projectgroup.py (+9/-10) lib/lp/registry/stories/object/xx-nameblacklist.txt (+38/-41) lib/lp/registry/stories/project/xx-project-edit.txt (+8/-11) lib/lp/registry/tests/test_projectgroup.py (+30/-2) lib/lp/testing/matchers.py (+2/-1) |
||||
| To merge this branch: | bzr merge lp:~bac/launchpad/bug-662994 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Graham Binns (community) | code | 2010-12-14 | Approve on 2010-12-14 |
|
Review via email:
|
|||
Commit Message
[r=gmb][ui=none][bug=662994] Allow registry experts to change project group name.
Description of the Change
= Summary =
A task for CHR and Curtis is to change project group names. The
registry team has never had the ability to do so.
== Proposed fix ==
Move the permission of name from launchpad.Edit to launchpad.Moderate
and from the +edit to the +review page.
== Pre-implementation notes ==
Talk with Curtis
== Implementation details ==
The change described gives ~registry the ability to change a PG name but
removes it from the PG owner. This effect is necessary due to the way
our permissions are partitioned between owners, admins, and registry.
On a positive note, it brings behavior of PG editing in-line with projects.
I also changed the matchers to expose 'Contains' in __all__ which had
been inadvertently left out.
== Tests ==
bin/test -vvm lp.registry -t xx-project-edit.txt -t test_projectgroup
== Demo and Q/A ==
= Launchpad lint =
I will fix these lint issues.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
7: source has bad indentation.
14: source exceeds 78 characters.
20: source has bad indentation.
24: source exceeds 78 characters.
30: source has bad indentation.
39: source has bad indentation.
56: source has bad indentation.
61: source has bad indentation.
./lib/lp/
144: E231 missing whitespace after ':'
236: Line exceeds 78 characters.

Hi Brad,
Just a few stylistic nitpicks; nothing major.
74 + view = create_ initialized_ view(self. project_ group, '+index',
75 + principal=user)
Arguments should start on the line after the opening parenthesis,
indented by 4 spaces.
85 + view = create_ initialized_ view(self. project_ group, '+index',
86 + principal=user)
Here too.
95 + view = create_ initialized_ view(self. project_ group, '+index',
96 + principal=user)
And here.
290 + self.assertRais es(Unauthorized ,
291 + setattr, self.pg, 'owner', new_owner)
And here.
295 + self.assertRais es(Unauthorized ,
296 + setattr, self.pg, 'name', 'new-name')
And here.