The ldap property is part of req.connection

This commit is contained in:
Johannes Zellner
2016-02-18 16:40:30 +01:00
parent f5570c2e63
commit b41642552d

View File

@@ -30,7 +30,7 @@ var GROUP_USERS_DN = 'cn=users,ou=groups,dc=cloudron';
var GROUP_ADMINS_DN = 'cn=admins,ou=groups,dc=cloudron';
function getAppByRequest(req, callback) {
var sourceIp = req.ldap.id.split(':')[0];
var sourceIp = req.connection.ldap.id.split(':')[0];
if (sourceIp.split('.').length !== 4) return callback(new ldap.InsufficientAccessRightsError('Missing source identifier'));
apps.getByIpAddress(sourceIp, function (error, app) {