Fix #yogosha23531 Can modify invoice line margin without permission on
invoice
This commit is contained in:
parent
35d8627550
commit
fad8cd1159
1 changed files with 6 additions and 3 deletions
|
|
@ -19,10 +19,11 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/margin/checkMargins.php
|
||||
* \file htdocs/margin/checkMargins.php
|
||||
* \ingroup margin
|
||||
* \brief Check margins
|
||||
* \brief Check margins
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
@ -76,6 +77,8 @@ if (GETPOST("button_search_x") || GETPOST("button_search")) {
|
|||
$action = 'update';
|
||||
}
|
||||
|
||||
$permissiontocreate = $user->hasRight('facture', 'creer');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -99,7 +102,7 @@ if (empty($reshook)) {
|
|||
// Selection of new fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
if ($action == 'update') {
|
||||
if ($action == 'update' && $permissiontocreate) {
|
||||
$datapost = $_POST;
|
||||
|
||||
foreach ($datapost as $key => $value) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue