fix: #7146 Better RTL handling on (de-)authentication

- RTL is applied (or unapplied) on login and logout depending on
  user language/guest-detected language.
- config is automatically saved into res.locals.config whenever
  loadConfig is called
- On login/logout, buildHeader is called instead of getting config
- On logout, req.uid is deleted instead of set to 0
This commit is contained in:
Julian Lam
2018-12-21 11:45:29 -05:00
parent 1ecedefae7
commit d81e0a5f5b
4 changed files with 17 additions and 10 deletions

View File

@@ -101,6 +101,10 @@ apiController.loadConfig = function (req, callback) {
config.bootswatchSkin = (meta.config.disableCustomUserSkins !== 1 && settings.bootswatchSkin && settings.bootswatchSkin !== '') ? settings.bootswatchSkin : '';
plugins.fireHook('filter:config.get', config, next);
},
function (config, next) {
req.res.locals.config = config;
process.nextTick(next, null, config);
},
], callback);
};