mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX Check "$search_sale" only if it's an internal user
This commit is contained in:
parent
2beb6e1e34
commit
3e3f9c755d
|
|
@ -286,7 +286,8 @@ foreach ($object->fields as $key => $val) {
|
|||
}
|
||||
}*/
|
||||
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
// Check only if it's an internal user
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,8 @@ $object->fields = dol_sort_array($object->fields, 'position');
|
|||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
|
||||
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
// Check only if it's an internal user
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,7 +217,8 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
|||
|
||||
$error = 0;
|
||||
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
// Check only if it's an internal user
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,8 @@ if ((!$user->hasRight("fournisseur", "facture", "lire") && !getDolGlobalString('
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
// Check only if it' an internal user
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,8 @@ $object->fields = dol_sort_array($object->fields, 'position');
|
|||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
|
||||
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
// Check only if it's an internal user
|
||||
if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user