View Source Plausible.Teams (Plausible v0.0.1)

Core context of teams.

Summary

Functions

Get or create user's team.

If the user has no non-guest membership yet, an implicit "My Team" team is created with them as an owner.

If the user already has an owner membership in an existing team, that team is returned.

If the user has a non-guest membership other than owner, :no_team error is returned.

Create (when necessary) and load team relation for provided site.

Used for sync logic to work smoothly during transitional period.

@spec on_trial?(Plausible.Teams.Team.t()) :: boolean()
Link to this function

read_team_schemas?(user)

View Source
@spec trial_days_left(Plausible.Teams.Team.t()) :: integer()