fix: Users should not be redirected to disabled authentication providers (#5055

* fix: Users should not be redirected to disabled authentication providers
Re-enabled tests in plugin directory

* Fix plugin http tests
This commit is contained in:
Tom Moor
2023-03-18 09:17:54 -04:00
committed by GitHub
parent 6dd4afccaf
commit 41f97b0563
7 changed files with 60 additions and 15 deletions

View File

@@ -36,6 +36,7 @@ import parseAttachmentIds from "@server/utils/parseAttachmentIds";
import { ValidationError } from "../errors";
import ApiKey from "./ApiKey";
import Attachment from "./Attachment";
import AuthenticationProvider from "./AuthenticationProvider";
import Collection from "./Collection";
import CollectionUser from "./CollectionUser";
import NotificationSetting from "./NotificationSetting";
@@ -71,8 +72,18 @@ export enum UserRole {
withAuthentications: {
include: [
{
separate: true,
model: UserAuthentication,
as: "authentications",
include: [
{
model: AuthenticationProvider,
as: "authenticationProvider",
where: {
enabled: true,
},
},
],
},
],
},