From 5eb9acf3e1768d3c5daea3160bc2f9324beb691a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Apr 2021 11:50:34 +0200 Subject: [PATCH] Update modMyModule.class.php --- .../template/core/modules/modMyModule.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 18bdfa54158..d212e10998e 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -264,17 +264,17 @@ class modMyModule extends DolibarrModules $r = 0; // Add here entries to declare new permissions /* BEGIN MODULEBUILDER PERMISSIONS */ - $this->rights[$r][0] = $this->numero . sprintf("%02d", $r); // Permission id (must not be already used) + $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) $this->rights[$r][1] = 'Read objects of MyModule'; // Permission label $this->rights[$r][4] = 'myobject'; $this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->read) $r++; - $this->rights[$r][0] = $this->numero . sprintf("%02d", $r); // Permission id (must not be already used) + $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) $this->rights[$r][1] = 'Create/Update objects of MyModule'; // Permission label $this->rights[$r][4] = 'myobject'; $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->write) $r++; - $this->rights[$r][0] = $this->numero . sprintf("%02d", $r); // Permission id (must not be already used) + $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) $this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label $this->rights[$r][4] = 'myobject'; $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->delete)