Fix: Can be enabled / disabled only in the main company with superadmin account

This commit is contained in:
Regis Houssin 2009-10-30 09:17:18 +00:00
parent db92b75d2b
commit 7d21e15f93
2 changed files with 2 additions and 2 deletions

View File

@ -450,7 +450,7 @@ foreach ($orders as $key => $value)
if (! empty($conf->global->$const_name))
{
// Module actif
if (! empty($objMod->always_enabled) || ($conf->global->MAIN_MODULE_MULTICOMPANY && $conf->entity!=1 && $objMod->core_enabled)) print $langs->trans("Required");
if (! empty($objMod->always_enabled) || (($conf->global->MAIN_MODULE_MULTICOMPANY && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) print $langs->trans("Required");
else print "<a href=\"modules.php?id=".$objMod->numero."&amp;action=reset&amp;value=" . $modName . "&amp;mode=" . $mode . "\">" . $langs->trans("Disable") . "</a></td>\n";
if (! empty($objMod->config_page_url))

View File

@ -57,7 +57,7 @@ class modMultiCompany extends DolibarrModules
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "Gestion Multi-Societe";
// Can be enabled / disabled only in the main company
// Can be enabled / disabled only in the main company with superadmin account
$this->core_enabled = 1;
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'development';