diff --git a/htdocs/modulebuilder/template/core/boxes/mybox.php b/htdocs/modulebuilder/template/core/boxes/mybox.php index 4fcdd69ae26..7200d07559a 100644 --- a/htdocs/modulebuilder/template/core/boxes/mybox.php +++ b/htdocs/modulebuilder/template/core/boxes/mybox.php @@ -84,7 +84,7 @@ class MyBox extends ModeleBoxes */ public function __construct(DoliDB $db, $param = '') { - global $langs; + global $user, $conf, $langs; $langs->load("boxes"); $langs->load('mymodule@mymodule'); @@ -93,6 +93,9 @@ class MyBox extends ModeleBoxes $this->boxlabel = $langs->transnoentitiesnoconv("MyBox"); $this->param = $param; + + //$this->enabled = $conf->global->FEATURES_LEVEL > 0; // Condition when module is enabled or not + //$this->hidden = ! ($user->rights->mymodule->myobject->read); // Condition when module is visible by user (test on permission) } /**