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=aeab59cf28ba48492342e9e12e2b18dea9f1d59e;hp=43a7dfdc443ab7447fb472dc31afa1b83402f9d7;hpb=d55be919b8416596eb27856f983e2dc953c2877d;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); }