Fix bug
"A user can always read its own card" false today for external user even if user get right to change his won info
This commit is contained in:
parent
30764a6c00
commit
96efa87708
@ -72,7 +72,9 @@ $socid=0;
|
||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
$feature2='user';
|
||||
if ($user->id == $id) { $feature2=''; $canreaduser=1; } // A user can always read its own card
|
||||
$result = restrictedArea($user, 'user', $id, '&user', $feature2);
|
||||
if (!$canreaduser) {
|
||||
$result = restrictedArea($user, 'user', $id, '&user', $feature2);
|
||||
}
|
||||
if ($user->id <> $id && ! $canreaduser) accessforbidden();
|
||||
|
||||
$langs->load("users");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user