diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index ef7f9f2e4..e012bfd05 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -6,7 +6,7 @@ import { me } from "./Users"; import { config } from "./Config"; import { Config } from "authentik-api"; -export function configureSentry(): Promise { +export function configureSentry(canDoPpi: boolean = false): Promise { return config().then((config) => { if (config.errorReportingEnabled) { Sentry.init({ @@ -47,7 +47,7 @@ export function configureSentry(): Promise { }, }); console.debug("authentik/config: Sentry enabled."); - if (config.errorReportingSendPii) { + if (config.errorReportingSendPii && canDoPpi) { me().then(user => { Sentry.setUser({ email: user.user.email }); console.debug("authentik/config: Sentry with PII enabled."); diff --git a/web/src/elements/sidebar/SidebarBrand.ts b/web/src/elements/sidebar/SidebarBrand.ts index 63f8a2d6e..69873309d 100644 --- a/web/src/elements/sidebar/SidebarBrand.ts +++ b/web/src/elements/sidebar/SidebarBrand.ts @@ -41,7 +41,7 @@ export class SidebarBrand extends LitElement { } firstUpdated(): void { - configureSentry().then((c) => {this.config = c;}); + configureSentry(true).then((c) => {this.config = c;}); } render(): TemplateResult {