mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
commit
04396cd7b3
@ -599,9 +599,14 @@ var module = {};
|
|||||||
try {
|
try {
|
||||||
isAuthenticated = (new carbonServer.Server()).authenticate(username, password);
|
isAuthenticated = (new carbonServer.Server()).authenticate(username, password);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error(e.message, e);
|
log.error(e.message);
|
||||||
response.sendError(500, e.message);
|
var messageForNotExistingDomain = "Could not find a domain for the username";
|
||||||
return;
|
if (e.message.indexOf(messageForNotExistingDomain) < 0) {
|
||||||
|
response.sendError(500, e.message);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
isAuthenticated = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
var tenantUser = carbonServer.tenantUser(username);
|
var tenantUser = carbonServer.tenantUser(username);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user