Private teams don't satisfy ValidPersonOrTeam, so can't set them as bug supervisor (or set private bugs for a project they registered)

Bug #302897 reported by Tom Haddon
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Brad Crittenden

Bug Description

As an example, I cannot set "canonical-bis" as a bug supervisor, and therefore can't set private bugs for the canonical-bis-openid team because I get two failures:

- Maintainer shows "Constraint not satisfied. The person or team who maintains the project information in Launchpad."
- I am unable to set the Bug Supervisor as I get the error "You must choose a valid person or team to be the bug supervisor for Canonical BIS Openid."

Revision history for this message
Graham Binns (gmb) wrote :

This also prevents bugs from being set as private manually once the Bug Supervisor has been set (at the DB level) to the private team. Marking this as high as its affecting an internal Canonical team.

Changed in launchpad-registry:
assignee: nobody → gmb
importance: Undecided → High
milestone: none → 2.1.12
status: New → In Progress
Revision history for this message
Graham Binns (gmb) wrote :

So, I've done some digging around and discovered there are a couple of problems:

1. in ValidPersonOrTeamVocabulary._doSearch() we don't return non-Public Persons. This makes sense if we're going to hide private teams but since we don't it seems a little odd.
2. in validators.validate_public_person() we deliberately prevent the linkage of non-Public Persons (well, the code that does the prevention is in is_valid_public_person().

The attached branch addresses these problems (though no tests were changed; I was just hacking about). If anyone wants to take this and run with it before the end of the weekend, feel free, otherwise I'll finish it on Monday.

Changed in launchpad-registry:
status: In Progress → Triaged
Revision history for this message
Graham Binns (gmb) wrote :

Still in progress; me silly.

Changed in launchpad-registry:
status: Triaged → In Progress
Revision history for this message
Guilherme Salgado (salgado) wrote :

AIUI, it is intentional that these teams can't be linked to most things. That is to prevent leaking of private memberships.

Have you seen the "Team Visibility" section in doc/person.txt?

Revision history for this message
Tom Haddon (mthaddon) wrote :

It's intentional that you can't make a private team/person a bug supervisor or a project maintainer? This is what's preventing us from marking a project as having Private Bugs...

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 302897] Re: Private teams don't satisfy ValidPersonOrTeam, so can't set them as bug supervisor (or set private bugs for a project they registered)

AFAIR, teams with private members can't be linked to anything. The test
I mentioned says there are exceptions, but it's not clear what are
these.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Doesn't that make private teams pretty much unusable?

Revision history for this message
Graham Binns (gmb) wrote :

2008/11/28 Guilherme Salgado <email address hidden>:
> AIUI, it is intentional that these teams can't be linked to most things.
> That is to prevent leaking of private memberships.
>
> Have you seen the "Team Visibility" section in doc/person.txt?

I've read that, but it didn't make the rationale behind the
implementation clear.

Private membership teams are just that: private membership; i.e. we
don't expose the membership list for the team. However, that the team
itself exists isn't a secret and any of them are easily navigable to
in the interface, hence my comment about hiding teams from the search
results, above.

AIUI we need to be able to set private teams as bug supervisors
(amongst other things). I assume that a workaround for that would be
to make the private team part of a public team and then set the public
team as bug supervisor.

Another problem is that private teams can't have bug subscriptions (LP
OOPSed when we tried setting things manually in the database). I don't
know whether the workaround I described above would work around this
problem, too.

Revision history for this message
Guilherme Salgado (salgado) wrote :

I remember discussing these constraints of private-membership teams
before their implementation, but I don't remember all the details.

Basically, whenever we link/subscribe one of these teams to something,
it becomes possible to infer the team's members, and that's what the
constraints are there to prevent. I thought this was a well-known
limitation of such teams, but it seems I was wrong.

Edwin, do you know what are the objects that we can link to a
private-membership team?

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

A team's membership could be inferred from the http://launchpad.net/~edwin-grubbs/+subscribedbugs page by noticing that the person is not directly subscribed to the bug, but a private team is subscribed to the bug.

The easiest solution is to hide the real name of team's. A bug could show up in +subscribedbugs, but when you check the subscribers of the bug, you would only be able to tell that some private team is subscribed, but you wouldn't know which specific private team that person is a member of.

Revision history for this message
Graham Binns (gmb) wrote :

Okay, I'm unassigning this from myself since I don't really have the domain nouse to fix the problem (and there's something a bit more in depth needed here in terms of deciding how to handle these links properly).

I'll leave it targeted to LP-Registry 2.1.12 for now to be retargeted later as needed.

Changed in launchpad-registry:
assignee: gmb → nobody
status: In Progress → Triaged
Revision history for this message
Curtis Hovey (sinzui) wrote :

We have a story of for obfuscating private name that may solve this bug. I believe we can implement this new feature for the first release of 2009.

Changed in launchpad-registry:
milestone: 2.1.12 → 2.2.1
Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → bac
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 2.2.1 → 2.2.2
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 2.2.2 → 2.2.3
Revision history for this message
Brad Crittenden (bac) wrote :

First pass landed in RF7945

Changed in launchpad-registry:
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 2.2.3 → 2.2.4
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote : Bug fixed by a commit

Fixed in devel r7945.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: story-private-teams
Revision history for this message
Brad Crittenden (bac) wrote :

Landed in db-devel 7971: Privacy framework and private teams allows to be bug subscribers and bug task assignees.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.