fix: Right ID defenition in module builder

This commit is contained in:
Florian HENRY 2021-04-01 17:08:26 +02:00
parent 89dbd745bf
commit 03ee7ec433

View File

@ -264,17 +264,17 @@ class modMyModule extends DolibarrModules
$r = 0; $r = 0;
// Add here entries to declare new permissions // Add here entries to declare new permissions
/* BEGIN MODULEBUILDER PERMISSIONS */ /* BEGIN MODULEBUILDER PERMISSIONS */
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][0] = $this->numero . $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Read objects of MyModule'; // Permission label $this->rights[$r][1] = 'Read objects of MyModule'; // Permission label
$this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
$r++; $r++;
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][0] = $this->numero . $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Create/Update objects of MyModule'; // Permission label $this->rights[$r][1] = 'Create/Update objects of MyModule'; // Permission label
$this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
$r++; $r++;
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][0] = $this->numero . $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label $this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label
$this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)