From 45451f08b02ca6eaaca77bde406ad0333860ad88 Mon Sep 17 00:00:00 2001 From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com> Date: Fri, 22 Jun 2018 12:25:14 +0200 Subject: [PATCH] Add rights check Add rights check when edit parcel informations(weight, tracking...) of a shipping --- htdocs/expedition/card.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index c9e86e95619..ab860ced2e9 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -503,12 +503,16 @@ if (empty($reshook)) } // Action update - else if ($action == 'settracking_number' || $action == 'settracking_url' - || $action == 'settrueWeight' - || $action == 'settrueWidth' - || $action == 'settrueHeight' - || $action == 'settrueDepth' - || $action == 'setshipping_method_id') + else if ( + ($action == 'settracking_number' + || $action == 'settracking_url' + || $action == 'settrueWeight' + || $action == 'settrueWidth' + || $action == 'settrueHeight' + || $action == 'settrueDepth' + || $action == 'setshipping_method_id') + && $user->rights->expedition->creer + ) { $error=0;