guards¶
Guards for the teams domain.
Team domain guards.
- app.domain.teams.guards.requires_team_admin(connection: ASGIConnection[Any, m.User, Token, Any], _: BaseRouteHandler) None[source]¶
Verify the connection user is a team admin.
- Parameters:
connection (ASGIConnection) – Request/Connection object.
_ (BaseRouteHandler) – Route handler.
- Raises:
PermissionDeniedException – Not authorized
- app.domain.teams.guards.requires_team_membership(connection: ASGIConnection[Any, m.User, Token, Any], _: BaseRouteHandler) None[source]¶
Verify the connection user is a member of the team.
- Parameters:
connection (ASGIConnection) – Request/Connection object.
_ (BaseRouteHandler) – Route handler.
- Raises:
PermissionDeniedException – Not authorized
- app.domain.teams.guards.requires_team_ownership(connection: ASGIConnection[Any, m.User, Token, Any], _: BaseRouteHandler) None[source]¶
Verify that the connection user is the team owner.
- Parameters:
connection (ASGIConnection) – Request/Connection object.
_ (BaseRouteHandler) – Route handler.
- Raises:
PermissionDeniedException – Not authorized