Merge pull request #6987 from atm-ph/fix_6962

FIX 6962 Can't create shipment if no write permission on order
This commit is contained in:
Laurent Destailleur 2017-06-12 17:46:29 +02:00 committed by GitHub
commit 4402c7fb89

View File

@ -73,7 +73,12 @@ $ref=GETPOST('ref','alpha');
// Security check
$socid='';
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user, $origin, $origin_id);
if ($origin == 'expedition') $result=restrictedArea($user, $origin, $id);
else {
$result=restrictedArea($user, 'expedition');
if (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden();
}
$action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha');