From 5a35381f777c3176599c32ae0e482a1ac1c8fc82 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 16 Jun 2022 17:22:52 +0300 Subject: [PATCH] Service accounts: don't update RBAC roles in OSS when creating service account (#50922) --- .../app/features/serviceaccounts/ServiceAccountCreatePage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx b/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx index 349debbd064..dc6bf19741d 100644 --- a/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx +++ b/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx @@ -85,7 +85,9 @@ export const ServiceAccountCreatePageUnconnected = ({ navModel }: Props): JSX.El tokens: response.tokens, }; await updateServiceAccount(response.id, data); - await updateUserRoles(pendingRoles, newAccount.id, newAccount.orgId); + if (contextSrv.licensedAccessControlEnabled()) { + await updateUserRoles(pendingRoles, newAccount.id, newAccount.orgId); + } } catch (e) { console.error(e); }