diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index 6f8fdcad996..4a91bf60c6c 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -138,4 +138,5 @@ ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:
varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example) AsciiToHtmlConverter=Ascii to HTML converter AsciiToPdfConverter=Ascii to PDF converter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. \ No newline at end of file +TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. +ModuleBuilderNotAllowed=The module builder is enabled but not allowed to your user. \ No newline at end of file diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index fba9b0d4855..0631725a22c 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -57,8 +57,8 @@ $modulename = dol_sanitizeFileName(GETPOST('modulename', 'alpha')); $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha')); // Security check -if (empty($conf->modulebuilder->enabled)) accessforbidden('ModuleBuilderNotAllowed'); -if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) accessforbidden('ModuleBuilderNotAllowed'); +if (empty($conf->modulebuilder->enabled)) accessforbidden(); +if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) accessforbidden($langs->trans('ModuleBuilderNotAllowed')); // Dir for custom dirs