forked from Wavyzz/dolibarr
Merge branch 'develop' into loaddolibarrenv
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
/* Copyright (C) 2015-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
@@ -66,13 +67,15 @@ if (!empty($user->socid)) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
//$user->rights->societe->lire = 0;$user->rights->fournisseur->lire = 0;
|
||||
//restrictedArea($user, 'societe', $id);
|
||||
|
||||
if (in_array($field, array('status'))) {
|
||||
restrictedArea($user, $element, $id);
|
||||
} elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
|
||||
restrictedArea($user, 'produit|service', $id, 'product&product', '', '', 'rowid');
|
||||
} else {
|
||||
accessforbidden("Bad value for combination of parameters element/field.", 0, 0, 1);
|
||||
exit;
|
||||
httponly_accessforbidden("Bad value for combination of parameters element/field.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user