fix: mising delete inventory perms with MAIN_USE_ADVANCED_PERMS (#26617)
* fix: mising delete inventory perms * fix: mising delete inventory perms
This commit is contained in:
parent
06915267a7
commit
7c43aa86c9
3 changed files with 9 additions and 2 deletions
|
|
@ -160,6 +160,13 @@ class modStock extends DolibarrModules
|
|||
$this->rights[6][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[6][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[6][0] = 1013;
|
||||
$this->rights[6][1] = 'inventoryDeletePermission'; // Permission label
|
||||
$this->rights[6][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[6][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[6][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$this->rights[8][0] = 1014;
|
||||
$this->rights[8][1] = 'inventoryValidatePermission'; // Permission label
|
||||
|
|
|
|||
|
|
@ -317,4 +317,4 @@ StockTransferRightRead=Read stocks transfers
|
|||
StockTransferRightCreateUpdate=Create/Update stocks transfers
|
||||
StockTransferRightDelete=Delete stocks transfers
|
||||
BatchNotFound=Lot / serial not found for this product
|
||||
WarningThisWIllAlsoDeleteStock=Warning, this will also destroy all quantities in stock in the warehouse
|
||||
WarningThisWIllAlsoDeleteStock=Warning, this will also destroy all quantities in stock in the warehouse
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
|||
} else {
|
||||
$permissiontoread = $user->rights->stock->inventory_advance->read;
|
||||
$permissiontoadd = $user->rights->stock->inventory_advance->write;
|
||||
$permissiontodelete = $user->rights->stock->inventory_advance->write;
|
||||
$permissiontodelete = $user->rights->stock->inventory_advance->delete;
|
||||
$permissionnote = $user->rights->stock->inventory_advance->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->stock->inventory_advance->write; // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->stock->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue