Commit 0df0a6ec854d2d7b7eaf94d8b59ff77af92075ba
1 parent
ca35ee3d
Exists in
master
and in
6 other branches
guest and impex users cannot modify password
Showing
2 changed files
with
4 additions
and
0 deletions
Show diff stats
js/app/AmdaApp.js
... | ... | @@ -440,6 +440,7 @@ Ext.define('amdaApp.AmdaApp', { |
440 | 440 | text : 'Reset password', |
441 | 441 | iconCls : 'icon-resetpwd', |
442 | 442 | id : 'resetpwd-win-tool', |
443 | + disabled: isGuest || (sessionID == 'impex'), | |
443 | 444 | handler : function(obj, e) { |
444 | 445 | e.stopEvent(); |
445 | 446 | var moduleId = obj.el.id; | ... | ... |
php/classes/AmdaClient.php
... | ... | @@ -249,6 +249,9 @@ class AmdaClient { |
249 | 249 | } |
250 | 250 | |
251 | 251 | public function resetUserPwd($login, $crt_pwd, $new_pwd) { |
252 | + if ($login == "impex" || str_starts_with($login, "guest")) { | |
253 | + return array('success' => false, 'message' => "You are not authorised to change this password"); | |
254 | + } | |
252 | 255 | try { |
253 | 256 | $data_array = array( |
254 | 257 | "login" => $login, | ... | ... |