diff --git a/js/app/AmdaApp.js b/js/app/AmdaApp.js index fa9782d..53f9a35 100755 --- a/js/app/AmdaApp.js +++ b/js/app/AmdaApp.js @@ -440,6 +440,7 @@ Ext.define('amdaApp.AmdaApp', { text : 'Reset password', iconCls : 'icon-resetpwd', id : 'resetpwd-win-tool', + disabled: isGuest || (sessionID == 'impex'), handler : function(obj, e) { e.stopEvent(); var moduleId = obj.el.id; diff --git a/php/classes/AmdaClient.php b/php/classes/AmdaClient.php index caa3e1f..1db67da 100644 --- a/php/classes/AmdaClient.php +++ b/php/classes/AmdaClient.php @@ -249,6 +249,9 @@ class AmdaClient { } public function resetUserPwd($login, $crt_pwd, $new_pwd) { + if ($login == "impex" || str_starts_with($login, "guest")) { + return array('success' => false, 'message' => "You are not authorised to change this password"); + } try { $data_array = array( "login" => $login, -- libgit2 0.21.2