Skip to content
Snippets Groups Projects
Commit b6e1285b authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: limit access setup page of core module to superadmin

parent 7d21e15f
No related branches found
No related tags found
No related merge requests found
......@@ -449,11 +449,20 @@ foreach ($orders as $key => $value)
print "<td align=\"center\" valign=\"top\">";
if (! empty($conf->global->$const_name))
{
// Module actif
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";
$disableSetup = 0;
// Module actif
if (! empty($objMod->always_enabled) || (($conf->global->MAIN_MODULE_MULTICOMPANY && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
{
print $langs->trans("Required");
if ($conf->global->MAIN_MODULE_MULTICOMPANY && $user->entity) $disableSetup++;
}
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))
if (! empty($objMod->config_page_url) && !$disableSetup)
{
if (is_array($objMod->config_page_url))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment