Merge lp:~sinzui/launchpad/team-membership-policy-1 into lp:launchpad/db-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 10172 | ||||
Proposed branch: | lp:~sinzui/launchpad/team-membership-policy-1 | ||||
Merge into: | lp:launchpad/db-devel | ||||
Diff against target: |
635 lines (+247/-91) 11 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+1/-0) lib/lp/registry/browser/person.py (+0/-21) lib/lp/registry/browser/team.py (+8/-3) lib/lp/registry/help/team-subscription-policy.html (+59/-0) lib/lp/registry/interfaces/person.py (+49/-20) lib/lp/registry/model/person.py (+2/-1) lib/lp/registry/templates/person-macros.pt (+4/-3) lib/lp/registry/tests/test_team.py (+116/-35) lib/lp/registry/vocabularies.py (+4/-4) lib/lp/soyuz/doc/archive.txt (+2/-2) lib/lp/soyuz/model/archive.py (+2/-2) |
||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/team-membership-policy-1 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Revell (community) | text and ui | Approve | |
Leonard Richardson (community) | Approve | ||
Review via email: mp+48203@code.launchpad.net |
Description of the change
Allow open teams to control how members join.
Launchpad bug: https:/
Pre-
Test command: ./bin/test -vv \
-t test_person_
-t test_team -t teammembership.txt -t team-join-views \
-t doc/archive.txt
Ubuntu loco teams where upset by the change to ensure team membership is
not compromised. Many OPEN teams are now Moderated and the work of approving
membership is disruptive. Providing the teams with an API script to
automatically approve members undermines the need manage membership of teams
that control secured assets.
The underling issue is that ~locoteams does not own any assets that need to
be secure. It is MODERATED because it needs to manage *how* users become
members. ~locoteams delegates user membership to its member teams, and it
only manages the direct members. The team *IS* open to anyone, but guards
who is a direct member using the propose-member feature of moderated teams.
There are two kinds of closed teams: RESTRICTED and MODERATED. Their first
concern is control. They limit membership because they control secured assets.
There could be two kinds of open teams: OPEN and DELEGATED. (Maybe change
OPEN to PERMISSIVE). They encourage membership to build communities. The
DELEGATED team reviews who is a direct member to manage the community
hierarchy. OPEN has no structure.
I do not believe this issue is about adding an exception for ~locoteams or
changing security to an ad hoc team declaration. We can validation the
community need by asking if other large communities need a DELEGATED policy
to organise their hierarchy.
-------
RULES
This bug:
* Add the DELEGATED TeamSubscriptio
This is an enum in the DB so the change will happen in staging.
* Revise the descriptions of all TeamSubscriptio
why they are used.
* Update the help text on the new team and team edit forms
* Update the hover help text that is shown next to the subscription
policy field on team pages
* Update the propose-member rules to be enforced for MODERATED and
DELEGATED teams.
* PS. line 1969 in archive.txt sets up a test that looks insecure.
* Update code that checks for OPEN to check for both OPEN and DELEGATED.
* Extra credit: change the comma used in the via column on +participation
to an arrow.
* Update help.launchpad.net
In a follow up bug:
* Change ~locoteams to DELEGATED.
* Restore the affected subteams (listed in the this bug) to OPEN.
QA
* Create a DELEGATED team
* Verify that users see the join the team link.
* Have another user create an OPEN team and propose membership
* Accept the membership
* Verify the OPEN team can add members.
* Verify the DELEGATED team is listed on the new member's +participation
page.
LINT
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
IMPLEMENTATION
Rewrote the description of the enums and added DELEGATED. I changed the order
so that they start with the most open enum and finish with the most closed.
I added OPEN_TEAM_POLICY and CLOSED_TEAM_POLICY so that code that tests
the rules of control have a common definition of enums. I updated
subscriptionpol
lib/
Update the code to use the common definition of open and closed teams.
The test_team diff is hard to read, so let me explain. There are no new
test methods. I refactored the test to be three tests of common, open, and
closed behaviours. I then subclasses the open and closed behaviour tests
to verify that each enum behaves as expected.
lib/
lib/
lib/
lib/
Updated the proposed rule in IPerson.join() to place users in the PROPOSED
status when a DELEGATED team is passed. I added unittest coverage for
join().
lib/
lib/
Removed an obsolete property to generate the enum description. The template
macro was using the enum itself. However, the description was only shown
as a tooltip for the help icon. Clicking the help icon did nothing. I moved
the tooltip to the actual text, and added a real help file and link for the
policy. I am not happy with the duplication of the enum text in the help file.
I reported bug 711358 about how we might generate help for enums.
lib/
lib/
lib/
Fixed a common bug in form where the help text exceeds the width of form
instructions. The forms now show the enum descriptions.
lib/
lib/
Fixed ambiguous documentation. The docs used an OPEN team when working with
the archive because the join() method would require a second step to approve
the member. I updated the test to use MODERATED and used the addMember()
method instead.
lib/
The text and widget change is illustrated at http:// people. canonical. com/~curtis/ subscription- policy. png