Merge lp:~bac/launchpad/bug-498179 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Edwin Grubbs on 2010-01-04 |
| Approved revision: | not available |
| Merged at revision: | not available |
| Proposed branch: | lp:~bac/launchpad/bug-498179 |
| Merge into: | lp:launchpad |
| Diff against target: |
125 lines (+99/-0) 3 files modified
lib/canonical/launchpad/security.py (+5/-0) lib/lp/registry/doc/private-team-roles.txt (+1/-0) lib/lp/registry/doc/private-team-visibility.txt (+93/-0) |
| To merge this branch: | bzr merge lp:~bac/launchpad/bug-498179 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Edwin Grubbs (community) | code | 2010-01-04 | Approve on 2010-01-04 |
|
Review via email:
|
|||
Commit Message
Allow admins of a public team invited to join a private team to see the information for the private team.
| Brad Crittenden (bac) wrote : | # |
| Edwin Grubbs (edwin-grubbs) wrote : | # |
Hi Brad,
This is a nice improvement. Besides what we discussed on IRC, I have a couple of minor comments below.
merge-conditional
-Edwin
IRC Log
-------
[3:00 PM] <EdwinGrubbs> bac: What is the purpose of adding the pub_member to the pub_team? It appears to have no effect on the test.
[3:00 PM] <bac> EdwinGrubbs: likely a mistake
[3:01 PM] <bac> EdwinGrubbs: oh, i was going to show that even though pub_owner could see private parts the mere pub_member could not
[3:01 PM] <bac> EdwinGrubbs: i think that's still a good thing to do, i just forgot to do it
[3:05 PM] <bac> EdwinGrubbs: this is what i intended: http://
{{{
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -75,9 +75,18 @@
>>> pub_owner in priv_team.
False
-But the public team's owner can see the priv-team's bits since his team
+The public team's owner can now see the priv-team's bits since his team
has been invited to join.
>>> login_person(
>>> print priv_team.name
priv-team
+
+But a non-admin member of the public team still cannot see anything
+about the team.
+
+ >>> login_person(
+ >>> print priv_team.name
+ Traceback (most recent call last):
+ ...
+ Unauthorized: (<Person at ... priv-team (Priv Team)>, 'name', 'launchpad.View')
}}}
[3:06 PM] <EdwinGrubbs> that looks good
[3:30 PM] <EdwinGrubbs> bac: I was thinking about the test to see if the user is in getDirectAdmini
[3:32 PM] <bac> EdwinGrubbs: good idea, i think
Comments on Diff
----------------
>=== modified file 'lib/lp/
>--- lib/lp/
>+++ lib/lp/
>@@ -243,6 +243,7 @@
> >>> import transaction
> >>> transaction.abort()
>
>+
> Structural Subscriptions
> =======
>
>
>=== added file 'lib/lp/
>--- lib/lp/
>+++ lib/lp/
>@@ -0,0 +1,83 @@
>+=====
>+ Private team visibility
>+=====
>+
>+Private and private membership team restrict the visibility of their
s/team/teams/
>+attributes to select sets of users in order to prevent leaking
>+confidential data.
>+
>+Private teams restrict the viewing of the membership list
>+to administrators and other members of the team.
You might want to say "Launchpad administrators", since
the team admins are also members, so it can sound redundant even
though it isn't.
>+ >>> from lp.registry.
>+ >>> priv_owner = factory.
>+ >>> priv_member = factory.

= Summary =
Private and Private Membership teams can invite public teams to become members. When
that happens an admin of the public team must go to a page to accept the membership.
Since the admin is likely not a member of the private team she is barred from
viewing anything related to the private team, resulting in an OOPS as reported in bug
498179.
== Proposed fix ==
Change the security rules to allow the admins of invited teams to see the private parts.
== Pre-implementation notes ==
None.
== Implementation details ==
As above.
== Tests ==
bin/test -vvt private- team-visibility .txt
== Demo and Q/A ==
Create a private team.
Create a public team.
As an admin on the private team invite the private team to be a member.
As an admin of the public team attempt to accept the invitation.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ security. py registry/ doc/private- team-roles. txt registry/ doc/private- team-visibility .txt
lib/canonical
lib/lp/
lib/lp/