Reformatting code

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

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

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

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

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

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

Loading…
Cancel
Save