mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix #yogosha23803
This commit is contained in:
@@ -944,7 +944,7 @@ Permission776=Pay expense reports
|
||||
Permission777=Read all expense reports (even those of user not subordinates)
|
||||
Permission778=Create/modify expense reports of everybody
|
||||
Permission779=Export expense reports
|
||||
Permission1001=Read stocks
|
||||
Permission1001=Read warehouses and stocks
|
||||
Permission1002=Create/modify warehouses
|
||||
Permission1003=Delete warehouses
|
||||
Permission1004=Read stock movements
|
||||
|
||||
@@ -42,12 +42,6 @@ $langs->loadLangs(array('products', 'stocks', 'orders'));
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('stockatdate'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'produit|service');
|
||||
|
||||
//checks if a product has been ordered
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
@@ -119,6 +113,14 @@ if ($mode == 'future') {
|
||||
}
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
$result = restrictedArea($user, 'produit|service'); // Must have permission to read product
|
||||
$result = restrictedArea($user, 'stock'); // Must have permission to read stock
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
Reference in New Issue
Block a user