Fix permission name

This commit is contained in:
Laurent Destailleur 2018-05-05 13:24:46 +02:00
parent 08cf034e2f
commit f6ca1eb624
4 changed files with 21 additions and 21 deletions

View File

@ -1265,9 +1265,9 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
} }
else 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/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->advance_inventory->write); $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->advance_inventory->read); $newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read);
} }
} }
} }

View File

@ -122,31 +122,31 @@ class modStock extends DolibarrModules
$this->rights[5][0] = 1011; $this->rights[5][0] = 1011;
$this->rights[5][1] = 'inventoryReadPermission'; // Permission label $this->rights[5][1] = 'inventoryReadPermission'; // Permission label
$this->rights[5][3] = 0; // Permission by default for new user (0/1) $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[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][0] = 1012;
$this->rights[6][1] = 'inventoryCreatePermission'; // Permission label $this->rights[6][1] = 'inventoryCreatePermission'; // Permission label
$this->rights[6][3] = 0; // Permission by default for new user (0/1) $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[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][0] = 1013;
$this->rights[7][1] = 'inventoryWritePermission'; // Permission label $this->rights[7][1] = 'inventoryWritePermission'; // Permission label
$this->rights[7][3] = 0; // Permission by default for new user (0/1) $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[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][0] = 1014;
$this->rights[8][1] = 'inventoryValidatePermission'; // Permission label $this->rights[8][1] = 'inventoryValidatePermission'; // Permission label
$this->rights[8][3] = 0; // Permission by default for new user (0/1) $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[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][0] = 1015;
$this->rights[9][1] = 'inventoryChangePMPPermission'; // Permission label $this->rights[9][1] = 'inventoryChangePMPPermission'; // Permission label
$this->rights[9][3] = 0; // Permission by default for new user (0/1) $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) $this->rights[9][5] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
} }

View File

@ -42,7 +42,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
} }
else else
{ {
$result = restrictedArea($user, 'stock', $id, '', 'advance_inventory'); $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance');
} }
// Initialize technical objects // Initialize technical objects
@ -82,8 +82,8 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
} }
else else
{ {
$permissiontoadd = $user->rights->stock->advance_inventory->create; $permissiontoadd = $user->rights->stock->inventory_advance->create;
$permissiontodelete = $user->rights->stock->advance_inventory->write; $permissiontodelete = $user->rights->stock->inventory_advance->write;
} }

View File

@ -78,7 +78,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
} }
else else
{ {
$result = restrictedArea($user, 'stock', $objectid, '', 'advance_inventory'); $result = restrictedArea($user, 'stock', $objectid, '', 'inventory_advance');
} }
// Initialize array of search criterias // Initialize array of search criterias