oauth should not be able to edit full name (#4713) (#4714)

(cherry picked from commit 2800de0922)

Co-authored-by: Hossein Ahmadian-Yazdi <hahmadia@users.noreply.github.com>
This commit is contained in:
Mattermost Build
2020-08-21 16:51:56 -04:00
committed by GitHub
parent 355f7a6b6e
commit 089d158b87

View File

@@ -18,10 +18,12 @@ function mapStateToProps(state, ownProps) {
const {auth_service: service} = ownProps.currentUser;
const firstNameDisabled = (service === 'ldap' && config.LdapFirstNameAttributeSet === 'true') ||
(service === 'saml' && config.SamlFirstNameAttributeSet === 'true');
(service === 'saml' && config.SamlFirstNameAttributeSet === 'true') ||
(['gitlab', 'google', 'office365'].includes(service));
const lastNameDisabled = (service === 'ldap' && config.LdapLastNameAttributeSet === 'true') ||
(service === 'saml' && config.SamlLastNameAttributeSet === 'true');
(service === 'saml' && config.SamlLastNameAttributeSet === 'true') ||
(['gitlab', 'google', 'office365'].includes(service));
const nicknameDisabled = (service === 'ldap' && config.LdapNicknameAttributeSet === 'true') ||
(service === 'saml' && config.SamlNicknameAttributeSet === 'true');