diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index bbae295b361..f75d0668bfd 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -44,6 +44,7 @@ $langs->load("categories"); // Load permissions $user->getrights('ecm'); +if (!$user->rights->ecm->create) accessforbidden(); // Get parameters $socid = isset($_GET["socid"])?$_GET["socid"]:''; diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index d98b221f24d..577bbda7ebf 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -255,7 +255,7 @@ print ''.$langs->trans("ECMNbOfDocsSmall") print ''.img_picto($langs->trans("Refresh"),'refresh').''; print ''; print ''; -if ($user->rights->ecm->create) +if ($user->rights->ecm->setup) { print ''.img_picto($langs->trans("ECMNewSection"),'edit_add').''; }