diff --git a/src/interfaces/Account.ts b/src/interfaces/Account.ts index 49d55d03..174904e9 100644 --- a/src/interfaces/Account.ts +++ b/src/interfaces/Account.ts @@ -24,6 +24,7 @@ export interface Account { lazy_connection_enabled: boolean; embedded_idp_enabled?: boolean; auto_update_version: string; + local_auth_disabled?: boolean; }; onboarding?: AccountOnboarding; } diff --git a/src/modules/users/UsersTable.tsx b/src/modules/users/UsersTable.tsx index 89bd51a3..c4d816f7 100644 --- a/src/modules/users/UsersTable.tsx +++ b/src/modules/users/UsersTable.tsx @@ -1,5 +1,6 @@ import Button from "@components/Button"; import Card from "@components/Card"; +import FullTooltip from "@components/FullTooltip"; import InlineLink from "@components/InlineLink"; import SquareIcon from "@components/SquareIcon"; import { DataTable } from "@components/table/DataTable"; @@ -319,20 +320,51 @@ export const InviteUserButton = ({ // On self-hosted: only show when embedded_idp_enabled is true const isCloud = isNetBirdHosted(); const embeddedIdpEnabled = account?.settings.embedded_idp_enabled; + const localAuthDisabled = account?.settings.local_auth_disabled; if (!isCloud && !embeddedIdpEnabled) return null; - return ( - - + + {isCloud ? "Invite User" : "Add User"} + + ); + + if (localAuthDisabled) { + return ( + + + Local authentication is disabled. Use your IdP for authentication. + + + + Learn more + + + + + } > - - {isCloud ? "Invite User" : "Add User"} - - - ); + {button} + + ); + } + + return {button}; };
+ Local authentication is disabled. Use your IdP for authentication. +