From 79fa2eec4896401d2444d973b3fcd2c59315796c Mon Sep 17 00:00:00 2001 From: guillaume-peoch-sonarsource Date: Fri, 26 Jul 2024 17:29:06 +0200 Subject: [PATCH] SONAR-22596 Trigger synchronisation after confirming auto-provisioning --- .../authentication/AutoProvisionningConsent.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx index 0e18dea9b7b..f6c20eaa44b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx @@ -59,7 +59,7 @@ export default function AutoProvisioningConsent(props: Readonly) { id: 'settings.authentication.confirm_auto_provisioning.header', }); - const onClickAutoProvisioning = () => { + const onClickAutoProvisioning = async () => { if (githubConfiguration) { updateGithubConfig({ id: githubConfiguration.id, @@ -69,7 +69,13 @@ export default function AutoProvisioningConsent(props: Readonly) { }); } if (gitlabConfiguration) { - resetSettingValue({ keys: [CONSENT_SETTING_KEY] }); + await resetSettingValue({ keys: [CONSENT_SETTING_KEY] }); + updateGitlabConfig({ + id: gitlabConfiguration.id, + data: { + provisioningType: ProvisioningType.auto, + }, + }); } }; -- 2.39.5