The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Move the SSO user provisioning card below the server settings (#83787)
Andrei Chernykh7445278da5de
diff --git a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.tsx b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.tsxindex 843ae79d641..74934ef298f 100644--- a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.tsx+++ b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.tsx@@ -190,11 +190,6 @@ export const SettingsJWTForm = () => {{({ dirty, isSubmitting }) => (<Form><Stack gap="xl">- <UserProvisioningSection- settingKey="jwt-user-provisioning-enabled?"- providerName="JWT"- reactivatesAccounts- /><SettingsSectiontitle={t`Server settings`}titleProps={SETTINGS_CARD_TITLE_PROPS}@@ -221,6 +216,11 @@ export const SettingsJWTForm = () => {/></Stack></SettingsSection>+ <UserProvisioningSection+ settingKey="jwt-user-provisioning-enabled?"+ providerName="JWT"+ reactivatesAccounts+ /><CollapsibleSettingsSectiontitle={t`User attribute configuration`}description={t`You can send additional user attributes to ${applicationName} by adding the attributes as key/value pairs to your JWT`}diff --git a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.unit.spec.tsxindex 14b26b9a3bc..bb25f6545c1 100644--- a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsJWTForm/SettingsJWTForm.unit.spec.tsx@@ -594,15 +594,15 @@ describe("SettingsJWTForm", () => {});describe("user provisioning", () => {- it("sits at the top of the page", async () => {+ it("sits right below the server settings", async () => {await setup();const cardTitles = screen.getAllByRole("heading", { level: 2 }).map((heading) => heading.textContent);expect(cardTitles).toEqual([- "User provisioning","Server settings",+ "User provisioning","User attribute configuration","Group mapping",]);diff --git a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.tsx b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.tsxindex 7293e55ac27..a5601071952 100644--- a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.tsx+++ b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.tsx@@ -305,11 +305,6 @@ export function SettingsOIDCForm() {{({ dirty, values, initialValues, isSubmitting, setFieldValue }) => (<Form><Stack gap="xl">- <UserProvisioningSection- settingKey="oidc-user-provisioning-enabled?"- providerName="OIDC"- />- {/* provisioning is its own setting, so the banner heads the cards it locks */}{lockedEnvName != null && <SetByEnvVar varName={lockedEnvName} />}<SettingsSection@@ -381,6 +376,12 @@ export function SettingsOIDCForm() {</Stack></SettingsSection>+ {/* its own setting, so it stays live under an env-locked provider */}+ <UserProvisioningSection+ settingKey="oidc-user-provisioning-enabled?"+ providerName="OIDC"+ />+<CollapsibleSettingsSectiontitle={t`Attributes`}description={t`Map OIDC claims to the first name and last name fields in ${applicationName}. The email always comes from the standard email claim.`}diff --git a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.unit.spec.tsxindex ee46c34a674..e7f829de16a 100644--- a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsOIDCForm/SettingsOIDCForm.unit.spec.tsx@@ -229,18 +229,18 @@ describe("SettingsOIDCForm", () => {/Using MB_OIDC_PROVIDERS/,);const banner = screen.getByTestId("setting-env-var-message");- const bannerAfterProvisioning = screen- .getByRole("switch", { name: "User provisioning" })- .compareDocumentPosition(banner);const serverSettingsAfterBanner = banner.compareDocumentPosition(screen.getByRole("heading", { name: "Server settings" }),);- expect(bannerAfterProvisioning & Node.DOCUMENT_POSITION_FOLLOWING).toBe(- Node.DOCUMENT_POSITION_FOLLOWING,+ const provisioningAfterBanner = banner.compareDocumentPosition(+ screen.getByRole("switch", { name: "User provisioning" }),);expect(serverSettingsAfterBanner & Node.DOCUMENT_POSITION_FOLLOWING).toBe(Node.DOCUMENT_POSITION_FOLLOWING,);+ expect(provisioningAfterBanner & Node.DOCUMENT_POSITION_FOLLOWING).toBe(+ Node.DOCUMENT_POSITION_FOLLOWING,+ );expect(queryMappingRow("admins")).toBeInTheDocument();expect(screen.queryByRole("button", { name: "New" }),@@ -295,8 +295,8 @@ describe("SettingsOIDCForm", () => {.getAllByRole("heading", { level: 2 }).map((heading) => heading.textContent);expect(cardTitles).toEqual([- "User provisioning","Server settings",+ "User provisioning","Attributes","Group mapping",]);diff --git a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.tsx b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.tsxindex e16b76feb1e..05196dc2b69 100644--- a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.tsx+++ b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.tsx@@ -128,13 +128,6 @@ export function SettingsSAMLForm() {{({ dirty, initialValues, isSubmitting, setFieldValue }) => (<Form><Stack gap="xl">- <UserProvisioningSection- settingKey="saml-user-provisioning-enabled?"- providerName="SAML"- reactivatesAccounts- lockedNote={scimNote}- />-<SettingsSectiontitle={t`Identity provider (IdP) configuration`}titleProps={SETTINGS_CARD_TITLE_PROPS}@@ -244,6 +237,13 @@ export function SettingsSAMLForm() {</Stack></SettingsSection>+ <UserProvisioningSection+ settingKey="saml-user-provisioning-enabled?"+ providerName="SAML"+ reactivatesAccounts+ lockedNote={scimNote}+ />+<CollapsibleSettingsSectiontitle={t`Sign SSO requests`}description={t`Use a keystore to sign authentication requests sent to your identity provider`}diff --git a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.unit.spec.tsxindex 4429ee246e2..2625d2a620c 100644--- a/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/auth/components/SettingsSAMLForm/SettingsSAMLForm.unit.spec.tsx@@ -179,9 +179,9 @@ describe("SettingsSAMLForm", () => {.getAllByRole("heading", { level: 2 }).map((heading) => heading.textContent);expect(cardTitles).toEqual([- "User provisioning","Identity provider (IdP) configuration","Identity provider info",+ "User provisioning","Sign SSO requests","Group mapping",]);diff --git a/frontend/src/metabase/admin/settings/components/SettingsLdapForm.enterprise.unit.spec.tsx b/frontend/src/metabase/admin/settings/components/SettingsLdapForm.enterprise.unit.spec.tsxindex 5b61cce70a4..2f55bca1327 100644--- a/frontend/src/metabase/admin/settings/components/SettingsLdapForm.enterprise.unit.spec.tsx+++ b/frontend/src/metabase/admin/settings/components/SettingsLdapForm.enterprise.unit.spec.tsx@@ -48,15 +48,15 @@ const setup = async (describe("SettingsLdapForm (EE)", () => {describe("user provisioning", () => {- it("sits at the top of the page", async () => {+ it("sits right below the server settings", async () => {await setup();const cardTitles = screen.getAllByRole("heading", { level: 2 }).map((heading) => heading.textContent);expect(cardTitles).toEqual([- "User provisioning","Server settings",+ "User provisioning","User schema","Attributes","Group mapping",diff --git a/frontend/src/metabase/admin/settings/components/SettingsLdapForm.tsx b/frontend/src/metabase/admin/settings/components/SettingsLdapForm.tsxindex 21c995a1f32..cf96ab34c2f 100644--- a/frontend/src/metabase/admin/settings/components/SettingsLdapForm.tsx+++ b/frontend/src/metabase/admin/settings/components/SettingsLdapForm.tsx@@ -178,7 +178,6 @@ export const SettingsLdapForm = () => {{({ dirty, initialValues, isSubmitting, setFieldValue }) => (<Form><Stack gap="xl">- <PLUGIN_LDAP_FORM_FIELDS.LdapUserProvisioning /><SettingsSectiontitle={t`Server settings`}titleProps={SETTINGS_CARD_TITLE_PROPS}@@ -232,6 +231,7 @@ export const SettingsLdapForm = () => {/></Stack></SettingsSection>+ <PLUGIN_LDAP_FORM_FIELDS.LdapUserProvisioning /><SettingsSectiontitle={t`User schema`}titleProps={SETTINGS_CARD_TITLE_PROPS}