Reformatting code

4.x.x
Megala 8 years ago
parent f9204add08
commit 0642cc10d7

@ -135,7 +135,6 @@ public interface UserManagementService {
" fetching the requested user.",
response = ErrorResponse.class)
})
@Permission(name = "View Users", permission = "/device-mgt/users/view")
Response getUser(
@ApiParam(

@ -180,7 +180,7 @@ var userModule = function () {
var domain;
if (username.indexOf('/') > 0) {
domain = username.substr(0, username.indexOf('/'));
username = username.substr(username.indexOf('/')+1);
username = username.substr(username.indexOf('/') + 1);
}
try {
utility.startTenantFlow(carbonUser);
@ -210,7 +210,7 @@ var userModule = function () {
var domain;
if (username.indexOf('/') > 0) {
domain = username.substr(0, username.indexOf('/'));
username = username.substr(username.indexOf('/')+1);
username = username.substr(username.indexOf('/') + 1);
}
try {
utility.startTenantFlow(carbonUser);

@ -236,7 +236,7 @@ $(document).ready(function () {
}
addUserFormData.roles = roles;
username = username.substr(username.indexOf('/') + 1);
var addUserAPI = deviceMgtBasePath + "/users/" + username + "?domain="+domain;
var addUserAPI = deviceMgtBasePath + "/users/" + username + "?domain=" + domain;
invokerUtil.put(
addUserAPI,

@ -165,14 +165,12 @@ function resetPassword(username) {
var domain;
if (username.indexOf('/') > 0) {
domain = username.substr(0, username.indexOf('/'));
username = username.substr(username.indexOf('/')+1);
username = username.substr(username.indexOf('/') + 1);
}
var resetPasswordServiceURL = apiBasePath + "/admin/users/"+ username +"/credentials";
var resetPasswordServiceURL = apiBasePath + "/admin/users/" + username + "/credentials";
if (domain) {
resetPasswordServiceURL += '?domain=' + domain;
}
invokerUtil.post(
resetPasswordServiceURL,
resetPasswordFormData,
@ -209,7 +207,7 @@ function removeUser(username) {
var domain;
if (username.indexOf('/') > 0) {
domain = username.substr(0, username.indexOf('/'));
username = username.substr(username.indexOf('/')+1);
username = username.substr(username.indexOf('/') + 1);
}
var removeUserAPI = apiBasePath + "/users/" + username;
if (domain) {

@ -66,9 +66,7 @@ $(document).ready(function () {
var changePasswordFormData = {};
changePasswordFormData["oldPassword"] = unescape((currentPassword));
changePasswordFormData["newPassword"] = unescape((newPassword));
var changePasswordAPI = "/api/device-mgt/v1.0/users/credentials";
invokerUtil.put(
changePasswordAPI,
changePasswordFormData,

Loading…
Cancel
Save