feat: Add setting to allow users to send invites (#6488)

This commit is contained in:
Tom Moor
2024-02-03 17:37:39 -08:00
committed by GitHub
parent 9046892864
commit c2b7d01c7d
14 changed files with 121 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
import { DefaultState } from "koa";
import randomstring from "randomstring";
import ApiKey from "@server/models/ApiKey";
import { buildUser, buildTeam } from "@server/test/factories";
import { buildUser, buildTeam, buildAdmin } from "@server/test/factories";
import auth from "./authentication";
describe("Authentication middleware", () => {
@@ -156,7 +156,7 @@ describe("Authentication middleware", () => {
it("should return an error for suspended users", async () => {
const state = {} as DefaultState;
const admin = await buildUser();
const admin = await buildAdmin();
const user = await buildUser({
suspendedAt: new Date(),
suspendedById: admin.id,