Merge pull request #19065 from javieralapps4up/develop
Access forbidden when the password of other users is changed
This commit is contained in:
commit
81882f8243
@ -417,6 +417,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
||||
if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->password) {
|
||||
continue; // User can edit its own password
|
||||
}
|
||||
if ($subfeature == 'user' && $user->id != $objectid && $user->rights->user->user->password) {
|
||||
continue; // User can edit another user's password
|
||||
}
|
||||
|
||||
if (empty($user->rights->$feature->$subfeature->creer)
|
||||
&& empty($user->rights->$feature->$subfeature->write)
|
||||
|
||||
@ -2036,7 +2036,11 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
|
||||
// Civility
|
||||
print '<tr><td class="titlefieldcreate"><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
|
||||
print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code');
|
||||
if ($caneditfield && !$object->ldap_sid) {
|
||||
print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code');
|
||||
} elseif ($object->civility_code) {
|
||||
print $langs->trans("Civility".$object->civility_code);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Lastname
|
||||
|
||||
Loading…
Reference in New Issue
Block a user