fix: error when licensing was not checked (#47201)

This commit is contained in:
Eric Leijonmarck
2022-04-01 16:57:02 +02:00
committed by GitHub
parent 7555ff2087
commit 07aa1349d8
2 changed files with 2 additions and 2 deletions
@@ -77,7 +77,7 @@ const ServiceAccountPageUnconnected = ({
const serviceAccountId = parseInt(match.params.id, 10);
loadServiceAccount(serviceAccountId);
loadServiceAccountTokens(serviceAccountId);
if (contextSrv.accessControlEnabled()) {
if (contextSrv.licensedAccessControlEnabled()) {
fetchACOptions();
}
}, [match, loadServiceAccount, loadServiceAccountTokens, fetchACOptions]);
@@ -67,7 +67,7 @@ const ServiceAccountsListPage = ({
useEffect(() => {
fetchServiceAccounts();
if (contextSrv.accessControlEnabled()) {
if (contextSrv.licensedAccessControlEnabled()) {
fetchACOptions();
}
}, [fetchServiceAccounts, fetchACOptions]);