GoogleOAuth: Unlock UI (#57350) (#57355)

(cherry picked from commit f184f9211c)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-10-20 09:05:52 -04:00
committed by GitHub
co-authored by Gabriel MABILLE
parent 15557bf4af
commit 188792428d
+2 -1
View File
@@ -111,9 +111,10 @@ export class UserAdminPage extends PureComponent<Props> {
const isOAuthUserWithSkippableSync =
user?.isExternal && user?.authLabels?.some((r) => SyncedOAuthLabels.includes(r));
const isSAMLUser = user?.isExternal && user?.authLabels?.includes('SAML');
const isGoogleUser = user?.isExternal && user?.authLabels?.includes('Google');
const isUserSynced =
!config.auth.DisableSyncLock &&
((user?.isExternal && !(isOAuthUserWithSkippableSync || isSAMLUser || isLDAPUser)) ||
((user?.isExternal && !(isGoogleUser || isOAuthUserWithSkippableSync || isSAMLUser || isLDAPUser)) ||
(!config.auth.OAuthSkipOrgRoleUpdateSync && isOAuthUserWithSkippableSync) ||
(!config.auth.SAMLSkipOrgRoleSync && isSAMLUser) ||
(!config.auth.LDAPSkipOrgRoleSync && isLDAPUser));