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 <provider>" message for external users
This commit is contained in:
Alexander Zobnin 2020-04-10 09:23:27 +03:00 committed by GitHub
parent bb357adcab
commit 4d81cec34f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,8 @@ export class UserProfile extends PureComponent<Props, State> {
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 (