2
0
forked from Wavyzz/dolibarr

FIX #yogosha12266

This commit is contained in:
Laurent Destailleur
2022-09-09 13:58:54 +02:00
parent 999e5861e3
commit b23ab2cb71
55 changed files with 316 additions and 317 deletions

View File

@@ -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
@@ -65,13 +66,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.");
}