Service accounts: don't update RBAC roles in OSS when creating service account (#50922)

This commit is contained in:
Alexander Zobnin
2022-06-16 17:22:52 +03:00
committed by GitHub
parent 118b071d98
commit 5a35381f77

View File

@@ -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);
}