l.s.f.s.TeamScope(ScopeWithPerson) : class documentation

Part of lp.services.features.scopes View In Hierarchy

A user's team memberships.

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 __init__ Undocumented
Method person Undocumented

Inherited from BaseScope (via ScopeWithPerson):

Method compiled_pattern The compiled scope matching regex. A small optimization.
def lookup(self, scope_name):
Is the given scope a team membership?

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).

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.