diff --git a/htdocs/core/modules/modModuleBuilder.class.php b/htdocs/core/modules/modModuleBuilder.class.php index 16ee16984d8..1c52ad866c2 100644 --- a/htdocs/core/modules/modModuleBuilder.class.php +++ b/htdocs/core/modules/modModuleBuilder.class.php @@ -45,6 +45,7 @@ class modModuleBuilder extends DolibarrModules // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "technic"; + $this->module_position = '90'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "A RAD (Rapid Application Development) tool to help developers to build their own module."; @@ -82,6 +83,21 @@ class modModuleBuilder extends DolibarrModules //------ $this->boxes = array(); + // Permissions + //------------ + $this->rights = array(); // Permission array used by this module + $this->rights_class = 'modulebuilder'; + + $r=0; + + $r++; + $this->rights[$r][0] = 3301; + $this->rights[$r][1] = 'Generate new modules'; + $this->rights[$r][2] = 'a'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'run'; + + // Main menu entries //------------------ $this->menu = array(); diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 51e35ab050a..0afcd403406 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -90,6 +90,9 @@ if (empty($newmask)) // This should no happen $newmask = '0664'; } +$result = restrictedArea($user, 'modulebuilder', null); + + /* * Actions