Remove email addresses from translatable strings (#8448)

* Fix User > Profile showing {getProgressDisplay()}

* Remove bad nextRewardAt check

* 1st iteration of issue #8385 - more pending

* #8385 config and jade fixes, tests pending

* #8385 fixing lint errors

* Fix faqs string and test

* Fix faq.jade and add workaround for faq.js

* Fixing accidental checking for faq.js

* fix emails in faq.js

* fetch emails once in auth.js

* Fixing community manager email in auth.js
This commit is contained in:
Gerardo Saca
2017-03-27 12:03:31 -04:00
committed by Matteo Pagliazzi
parent 5eadf9e486
commit 842fbe42a8
19 changed files with 52 additions and 28 deletions

View File

@@ -4,6 +4,9 @@ import {
import {
model as User,
} from '../models/user';
import nconf from 'nconf';
const COMMUNITY_MANAGER_EMAIL = nconf.get('EMAILS:COMMUNITY_MANAGER_EMAIL');
// Strins won't be translated here because getUserLanguage has not run yet
@@ -26,7 +29,7 @@ export function authWithHeaders (optional = false) {
.exec()
.then((user) => {
if (!user) throw new NotAuthorized(res.t('invalidCredentials'));
if (user.auth.blocked) throw new NotAuthorized(res.t('accountSuspended', {userId: user._id}));
if (user.auth.blocked) throw new NotAuthorized(res.t('accountSuspended', {communityManagerEmail: COMMUNITY_MANAGER_EMAIL, userId: user._id}));
res.locals.user = user;