From 4d81cec34f2f614dcb7d2403023905e14b5e40d3 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 10 Apr 2020 09:23:27 +0300 Subject: [PATCH] Admin: Fix Synced via LDAP message for non-LDAP external users (#23477) * UserAdmin: remove Synced via LDAP message for non-LDAP users * UserAdmin: show "Synced via " message for external users --- public/app/features/admin/UserProfile.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/features/admin/UserProfile.tsx b/public/app/features/admin/UserProfile.tsx index 4a1bf2fb4a4..cfdd1ade808 100644 --- a/public/app/features/admin/UserProfile.tsx +++ b/public/app/features/admin/UserProfile.tsx @@ -82,7 +82,8 @@ export class UserProfile extends PureComponent { render() { const { user } = this.props; const { showDeleteModal, showDisableModal } = this.state; - const lockMessage = 'Synced via LDAP'; + const authSource = user.authLabels?.length && user.authLabels[0]; + const lockMessage = authSource ? `Synced via ${authSource}` : ''; const styles = getStyles(config.theme); return (