Fix: limit access setup page of core module to superadmin
This commit is contained in:
parent
7d21e15f93
commit
b6e1285b81
@ -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."&action=reset&value=" . $modName . "&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."&action=reset&value=" . $modName . "&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))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user