X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fweb%2Froot%2Fsrc%2Fmain%2Fresources%2Fjs%2Fopen.js;h=619edcaf2cba5ed4bb5d5d08359c13333a702d5a;hb=52757c15dc010e68ef15899daf50f78291966bee;hp=43a7dfdc443ab7447fb472dc31afa1b83402f9d7;hpb=1415e57c132459f962afcc976da3b72c28a5702b;p=controller.git diff --git a/opendaylight/web/root/src/main/resources/js/open.js b/opendaylight/web/root/src/main/resources/js/open.js index 43a7dfdc44..619edcaf2c 100644 --- a/opendaylight/web/root/src/main/resources/js/open.js +++ b/opendaylight/web/root/src/main/resources/js/open.js @@ -443,9 +443,12 @@ one.main.admin = { // change password binding $('#'+one.main.admin.id.modal.password.submit, $modal).click(function() { one.main.admin.password.submit(id, $modal, function(result) { - if (result.code == 'SUCCESS') { - $modal.modal('hide'); - successCallback(); + if (result.success) { + //if changed own password, enforce relogin + if (id.trim() == $('#currentuser').val().trim()) { + alert("Password changed successfully. Please re-login with your new password."); + window.location = '/'; + } } else { alert(result.code+': '+result.description); }