mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-29 10:49:14 +01:00
* wip: add provider field to sqlite user table * feat: disable invites when credentials provider is not used * wip: add migration for provider field in user table with sqlite * wip: remove fields that can not be modified by non credential users * wip: make username, mail and avatar disabled instead of hidden * wip: external users membership of group cannot be managed manually * feat: add alerts to inform about disabled fields and managing group members * wip: add mysql migration for provider on user table * chore: fix format issues * chore: address pull request feedback * fix: build issue * fix: deepsource issues * fix: tests not working * feat: restrict login to specific auth providers * chore: address pull request feedback * fix: deepsource issue
10 lines
409 B
TypeScript
10 lines
409 B
TypeScript
import type { SupportedAuthProvider } from "@homarr/definitions";
|
|
|
|
import { env } from "../env.mjs";
|
|
|
|
export const isProviderEnabled = (provider: SupportedAuthProvider) => {
|
|
// The question mark is placed there because isProviderEnabled is called during static build of about page
|
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
return env.AUTH_PROVIDERS?.includes(provider);
|
|
};
|