Part of lp.services.features.scopes View In Hierarchy
Team ID scopes are written as 'team:' + the team name to match.
The scope 'team:launchpad-beta-users' will match members of the team 'launchpad-beta-users'.
The constructor takes a callable that returns the currently logged in person because Scopes are set up very early in the request publication process -- in particular, before authentication has happened.
|Method||lookup||Is the given scope a team membership?|
Inherited from ScopeWithPerson:
|Method||compiled_pattern||The compiled scope matching regex. A small optimization.|
This will do a two queries, so we probably want to keep the number of team based scopes in use to a small number. (Person.inTeam could be fixed to reduce this to one query).