Merge lp:~stevenk/launchpad/make-person-visibility-mutate into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Steve Kowalik |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14791 |
Proposed branch: | lp:~stevenk/launchpad/make-person-visibility-mutate |
Merge into: | lp:launchpad |
Diff against target: |
398 lines (+118/-41) 8 files modified
lib/lp/registry/browser/team.py (+22/-17) lib/lp/registry/browser/tests/test_team.py (+23/-0) lib/lp/registry/configure.zcml (+1/-6) lib/lp/registry/interfaces/person.py (+37/-16) lib/lp/registry/model/person.py (+21/-0) lib/lp/registry/stories/webservice/xx-private-team.txt (+1/-1) lib/lp/registry/tests/test_errors.py (+6/-0) lib/lp/registry/tests/test_person.py (+7/-1) |
To merge this branch: | bzr merge lp:~stevenk/launchpad/make-person-visibility-mutate |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Booth (community) | Approve | ||
Review via email: mp+92715@code.launchpad.net |
Commit message
[r=wallyworld][bug=928440] No longer require launchpad.
Description of the change
Recently I landed a branch that allowed an owner of a team with a commercial subscription to create private teams and change the visibility of existing teams.
However, there was a great, big glaring problem with that. Namely, to edit the visibility attribute on ITeam required the launchpad.
This branch changes that, visibility is now a property on IPersonPublic, and I've added a mutator method that checks if the calling user has a current commercial subscription if the feature flag is on, and falls back to launchpad.
I have also cleaned up some lint, and some import crazyness in lp.registry.
Looks good. Thanks for making the suggested changes.
With the new error type FORBIDDEN added to the ImmutableVisibi lityError, you should add a test like in registry/ test_errors. py
def test_ImmutableV isibilityError_ forbidden( self): webservice_ error_view(
ImmutableV isibilityError( ))
self.assertEqu al(FORBIDDEN, error_view.status)
error_view = create_