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

Fix: limit access setup page of core module to superadmin

parent f52b7c08
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ require_once(DOL_DOCUMENT_ROOT.'/multicompany/multicompany.class.php');
$langs->load("admin");
if (!$user->admin)
if (!$user->admin || $user->entity)
accessforbidden();
$mc = new Multicompany($db);
......@@ -88,7 +88,7 @@ else
{
print_titre($langs->trans("ListOfEntity"));
$mc->getEntities();
$mc->getEntities(1);
//var_dump($mc->entities);
$mc->assign_smarty_values($smarty,$_GET["action"]);
......
......@@ -163,7 +163,7 @@ class Multicompany
/**
* \brief List of entities
*/
function getEntities()
function getEntities($details=0)
{
global $conf;
......@@ -195,7 +195,7 @@ class Multicompany
$this->entities[$i]['label'] = $obj->value;
$this->entities[$i]['id'] = $obj->entity;
$this->entities[$i]['details'] = $this->fetch($entity);
if ($details) $this->entities[$i]['details'] = $this->fetch($entity);
$this->entities[$i]['active'] = $active;
$i++;
......
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