fix: Do not show actively disabled auth providers in self-hosted install (#4794)

* fix: Do not show actively disabled auth providers in self-hosted installation

* self review

* Refactor for easier mocking
This commit is contained in:
Tom Moor
2023-01-28 10:02:25 -08:00
committed by GitHub
parent aac495fa58
commit 075555a867
17 changed files with 95 additions and 62 deletions

View File

@@ -4,7 +4,6 @@ import Oy from "oy-vey";
import env from "@server/env";
import Logger from "@server/logging/Logger";
import { trace } from "@server/logging/tracing";
import isCloudHosted from "@server/utils/isCloudHosted";
import { baseStyles } from "./templates/components/EmailLayout";
const useTestEmailService =
@@ -79,7 +78,7 @@ export class Mailer {
subject: data.subject,
html,
text: data.text,
attachments: isCloudHosted
attachments: env.isCloudHosted()
? undefined
: [
{

View File

@@ -1,7 +1,6 @@
import { Table, TBody, TR, TD } from "oy-vey";
import * as React from "react";
import env from "@server/env";
import isCloudHosted from "@server/utils/isCloudHosted";
import EmptySpace from "./EmptySpace";
const url = env.CDN_URL ?? env.URL;
@@ -16,7 +15,7 @@ export default () => {
<img
alt={env.APP_NAME}
src={
isCloudHosted
env.isCloudHosted()
? `${url}/email/header-logo.png`
: "cid:header-image"
}