Skip to content
Snippets Groups Projects
Commit 936e54a2 authored by William Enright's avatar William Enright
Browse files

refactored isHSQLConfig function on search page

Change-Id: I74e14b72106f8e419061eef380a51950d952f126
parent 3923c3ce
Branches
No related tags found
No related merge requests found
...@@ -158,7 +158,7 @@ function listAllUsers(data, statusCode, jqXHR) ...@@ -158,7 +158,7 @@ function listAllUsers(data, statusCode, jqXHR)
}); });
setTimeout(function() { setTimeout(function() {
ajaxApiCall(api_path_get_directories, 'GET', null, null, ishsqlConfig); ajaxApiCall(api_path_get_directories, 'GET', null, null, isLocalDB);
}, 100); }, 100);
addListenersForActions(); addListenersForActions();
} }
...@@ -443,20 +443,9 @@ function handleUserAutofill(data, statusCode, jqXHR) { ...@@ -443,20 +443,9 @@ function handleUserAutofill(data, statusCode, jqXHR) {
} }
} }
function ishsqlConfig(data, statusCode, jqXHR){ function isLocalDB(data, statusCode, jqXHR){
if (jqXHR.status == 200 && data.length > 1) { if (jqXHR.status == 200) {
var resultSet = data; if (data[0].type === "LOCAL" && data[0].realm === "LOCAL") {
// ignore the first result since it's the auth service for admin accounts that is always present.
for (i = 1; i < resultSet.length; i++) {
if (resultSet[i] === "net.jami.accountmanagementserver.hsqlconnector.HSQLConnector") {
$('.user-create-div').show();
$('.edit-user').show();
break;
}
}
} else if (jqXHR.status == 200 && data.length == 1) {
// ignore the first result since it's the auth service for admin accounts that is always present.
if (data[0] === "net.jami.accountmanagementserver.hsqlconnector.HSQLConnector") {
$('.user-create-div').show(); $('.user-create-div').show();
$('.edit-user').show(); $('.edit-user').show();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment