2
0
forked from Wavyzz/dolibarr

Clean permissions for barcode menu

This commit is contained in:
Laurent Destailleur
2022-09-08 14:58:00 +02:00
parent e6d0e4ebca
commit c3f673c3ad
9 changed files with 69 additions and 39 deletions

View File

@@ -49,6 +49,17 @@ $modBarCodeThirdparty = '';
$maxperinit = 1000;
// Security check (enable the most restrictive one)
//if ($user->socid > 0) accessforbidden();
//if ($user->socid > 0) $socid = $user->socid;
if (!isModEnabled('barcode')) {
accessforbidden('Module not enabled');
}
//restrictedArea($user, 'barcode');
if (empty($user->admin)) {
accessforbidden('Must be admin');
}
/*
* Actions
@@ -262,13 +273,6 @@ if ($action == 'initbarcodeproducts') {
* View
*/
if (!$user->admin) {
accessforbidden();
}
if (empty($conf->barcode->enabled)) {
accessforbidden();
}
$form = new Form($db);
llxHeader('', $langs->trans("MassBarcodeInit"));