[v11.2.x] Fix: Do not fetch Orgs if the user is authenticated by apikey/sa or render key (#97264)
Fix: Do not fetch Orgs if the user is authenticated by apikey/sa or render key (#97162)
* Do not fetch Orgs if the user is authenticated by apikey/sa or render svc
* Lint
(cherry picked from commit fa634e1476)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
co-authored by
Misi
parent
6418dab0d6
commit
9b5b0163f6
@@ -24,7 +24,10 @@ export function OrganizationSwitcher() {
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
if (contextSrv.isSignedIn) {
|
||||
if (
|
||||
contextSrv.isSignedIn &&
|
||||
!(contextSrv.user.authenticatedBy === 'apikey' || contextSrv.user.authenticatedBy === 'render')
|
||||
) {
|
||||
dispatch(getUserOrganizations());
|
||||
}
|
||||
}, [dispatch]);
|
||||
|
||||
Reference in New Issue
Block a user