dilanua 8 years ago
parent 6fea974c90
commit d8e057abdd

@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.api;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.api.Permission; import org.wso2.carbon.apimgt.annotations.api.Permission;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.jaxrs.beans.*; import org.wso2.carbon.device.mgt.jaxrs.beans.*;
import javax.ws.rs.*; import javax.ws.rs.*;
@ -471,7 +470,7 @@ public interface UserManagementService {
"Server error occurred while updating credentials of the user.", "Server error occurred while updating credentials of the user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Permission(name = "View Users", permission = "/device-mgt/users/view") @Permission(name = "Reset user password", permission = "/login")
Response resetPassword( Response resetPassword(
@ApiParam( @ApiParam(
name = "username", name = "username",

@ -64,8 +64,8 @@ $(document).ready(function () {
$(errorMsgWrapper).removeClass("hidden"); $(errorMsgWrapper).removeClass("hidden");
} else { } else {
var changePasswordFormData = {}; var changePasswordFormData = {};
changePasswordFormData.currentPassword = unescape((currentPassword)); changePasswordFormData["oldPassword"] = unescape((currentPassword));
changePasswordFormData.newPassword = unescape((newPassword)); changePasswordFormData["newPassword"] = unescape((newPassword));
var changePasswordAPI = "/api/device-mgt/v1.0/users/" + user + "/credentials"; var changePasswordAPI = "/api/device-mgt/v1.0/users/" + user + "/credentials";

Loading…
Cancel
Save