Fix permission name
This commit is contained in:
parent
08cf034e2f
commit
f6ca1eb624
@ -1257,18 +1257,18 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$langs->load("stocks");
|
||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||
}
|
||||
else
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->advance_inventory->read, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->advance_inventory->write);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->advance_inventory->read);
|
||||
}
|
||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||
}
|
||||
else
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -122,31 +122,31 @@ class modStock extends DolibarrModules
|
||||
$this->rights[5][0] = 1011;
|
||||
$this->rights[5][1] = 'inventoryReadPermission'; // Permission label
|
||||
$this->rights[5][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[5][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[5][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[5][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[6][0] = 1012;
|
||||
$this->rights[6][1] = 'inventoryCreatePermission'; // Permission label
|
||||
$this->rights[6][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[6][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$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] = 'create'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[7][0] = 1013;
|
||||
$this->rights[7][1] = 'inventoryWritePermission'; // Permission label
|
||||
$this->rights[7][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[7][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[7][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[7][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[8][0] = 1014;
|
||||
$this->rights[8][1] = 'inventoryValidatePermission'; // Permission label
|
||||
$this->rights[8][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[8][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[8][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[8][5] = 'validate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[9][0] = 1015;
|
||||
$this->rights[9][1] = 'inventoryChangePMPPermission'; // Permission label
|
||||
$this->rights[9][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[9][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[9][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[9][5] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = restrictedArea($user, 'stock', $id, '', 'advance_inventory');
|
||||
$result = restrictedArea($user, 'stock', $id, '', 'inventory_advance');
|
||||
}
|
||||
|
||||
// Initialize technical objects
|
||||
@ -82,8 +82,8 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
}
|
||||
else
|
||||
{
|
||||
$permissiontoadd = $user->rights->stock->advance_inventory->create;
|
||||
$permissiontodelete = $user->rights->stock->advance_inventory->write;
|
||||
$permissiontoadd = $user->rights->stock->inventory_advance->create;
|
||||
$permissiontodelete = $user->rights->stock->inventory_advance->write;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = restrictedArea($user, 'stock', $objectid, '', 'advance_inventory');
|
||||
$result = restrictedArea($user, 'stock', $objectid, '', 'inventory_advance');
|
||||
}
|
||||
|
||||
// Initialize array of search criterias
|
||||
|
||||
Loading…
Reference in New Issue
Block a user