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
This commit is contained in:
@@ -28,7 +28,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