feat: Enforce single team when self-hosted (#1954)

* fix: Enforce single team when self hosting

* test: positive case

* refactor

* fix: Visible error message on login screen for max teams scenario

* Update Notices.js

* lint
This commit is contained in:
Tom Moor
2021-03-18 21:56:24 -07:00
committed by GitHub
parent 138336639d
commit 1b972070d7
9 changed files with 101 additions and 8 deletions

View File

@@ -69,6 +69,12 @@ export function OAuthStateMismatchError(
return httpErrors(400, message, { id: "state_mismatch" });
}
export function MaximumTeamsError(
message: string = "The maximum number of teams has been reached"
) {
return httpErrors(400, message, { id: "maximum_teams" });
}
export function EmailAuthenticationRequiredError(
message: string = "User must authenticate with email",
redirectUrl: string = env.URL