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

This commit is contained in:
Eric Leijonmarck 2022-04-01 15:57:02 +01:00 committed by GitHub
parent 7555ff2087
commit 07aa1349d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -67,7 +67,7 @@ const ServiceAccountsListPage = ({
useEffect(() => {
fetchServiceAccounts();
if (contextSrv.accessControlEnabled()) {
if (contextSrv.licensedAccessControlEnabled()) {
fetchACOptions();
}
}, [fetchServiceAccounts, fetchACOptions]);