2
0
forked from Wavyzz/dolibarr

use user hasRgiht

This commit is contained in:
Frédéric FRANCE
2023-06-14 20:23:21 +02:00
parent 740ac26277
commit 0118b4ac89
12 changed files with 12 additions and 12 deletions

View File

@@ -691,7 +691,7 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
$deleteok = 0;
}
} elseif ($feature == 'produit|service') {
if (!$user->rights->produit->supprimer && !$user->rights->service->supprimer) {
if (!$user->hasRight('produit', 'supprimer') && !$user->hasRight('service', 'supprimer')) {
$deleteok = 0;
}
} elseif ($feature == 'commande_fournisseur') {