[MM-13839] Remove possibility to change eMail within mobile app (#2540)

* Make eMail setting read only

* Add translation entry, change wording

* Update wording
This commit is contained in:
Daniel Schalla 2019-02-01 23:34:57 +01:00 committed by Elias Nahum
parent d627f96589
commit 409d36d375
2 changed files with 7 additions and 10 deletions

View file

@ -354,21 +354,17 @@ export default class EditProfile extends PureComponent {
renderEmailSettings = () => {
const {formatMessage} = this.context.intl;
const {config, currentUser, theme} = this.props;
const {currentUser, theme} = this.props;
const {email} = this.state;
let helpText;
let disabled = false;
if (config.SendEmailNotifications !== 'true') {
disabled = true;
if (currentUser.auth_service === '') {
helpText = formatMessage({
id: 'user.settings.general.emailHelp1',
defaultMessage: 'Email is used for sign-in, notifications, and password reset. Email requires verification if changed.',
id: 'user.settings.general.emailCantUpdate',
defaultMessage: 'Email must be updated using a web client or desktop application.',
});
} else if (currentUser.auth_service !== '') {
disabled = true;
} else {
switch (currentUser.auth_service) {
case 'gitlab':
helpText = formatMessage({
@ -406,7 +402,7 @@ export default class EditProfile extends PureComponent {
return (
<View>
<TextSetting
disabled={disabled}
disabled={true}
id='email'
label={holders.email}
disabledText={helpText}

View file

@ -522,6 +522,7 @@
"user.settings.display.normalClock": "12-hour clock (example: 4:00 PM)",
"user.settings.display.preferTime": "Select how you prefer time displayed.",
"user.settings.general.email": "Email",
"user.settings.general.emailCantUpdate": "Email must be updated using a web client or desktop application.",
"user.settings.general.emailGitlabCantUpdate": "Login occurs through GitLab. Email cannot be updated. Email address used for notifications is {email}.",
"user.settings.general.emailGoogleCantUpdate": "Login occurs through Google. Email cannot be updated. Email address used for notifications is {email}.",
"user.settings.general.emailHelp1": "Email is used for sign-in, notifications, and password reset. Email requires verification if changed.",