chg: [user] edit restricted to password only for self
parent
b80d778e1a
commit
ec994b05ed
|
@ -119,12 +119,15 @@ class UsersController extends AppController
|
|||
'password'
|
||||
],
|
||||
'fields' => [
|
||||
'id', 'individual_id', 'username', 'disabled', 'password', 'confirm_password'
|
||||
'password', 'confirm_password'
|
||||
]
|
||||
];
|
||||
if (!empty($this->ACL->getUser()['role']['perm_admin'])) {
|
||||
$params['fields'][] = 'individual_id';
|
||||
$params['fields'][] = 'username';
|
||||
$params['fields'][] = 'role_id';
|
||||
$params['fields'][] = 'organisation_id';
|
||||
$params['fields'][] = 'disabled';
|
||||
}
|
||||
$this->CRUD->edit($id, $params);
|
||||
$responsePayload = $this->CRUD->getResponsePayload();
|
||||
|
|
Loading…
Reference in New Issue