355de5b0a4
the notification wasn't working because this was in apptask and the apptask died before it could send out the email. we now move the notification to box process and also remove the email notification.
16 lines
557 B
JavaScript
16 lines
557 B
JavaScript
'use strict';
|
|
|
|
exports = module.exports = {
|
|
CRON: { userId: null, username: 'cron' },
|
|
HEALTH_MONITOR: { userId: null, username: 'healthmonitor' },
|
|
EXTERNAL_LDAP_TASK: { userId: null, username: 'externalldap' },
|
|
EXTERNAL_LDAP_AUTO_CREATE: { userId: null, username: 'externalldap' },
|
|
|
|
fromRequest: fromRequest
|
|
};
|
|
|
|
function fromRequest(req) {
|
|
var ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress || null;
|
|
return { ip: ip, username: req.user ? req.user.username : null, userId: req.user ? req.user.id : null };
|
|
}
|