Fix: Can be enabled / disabled only in the main company with superadmin account
This commit is contained in:
parent
db92b75d2b
commit
7d21e15f93
@ -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."&action=reset&value=" . $modName . "&mode=" . $mode . "\">" . $langs->trans("Disable") . "</a></td>\n";
|
||||
|
||||
if (! empty($objMod->config_page_url))
|
||||
|
||||
@ -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';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user