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

This commit is contained in:
Hossein Ahmadian-Yazdi 2020-08-21 15:04:54 -04:00 committed by GitHub
parent 68457c5e7e
commit 2800de0922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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');