diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index bbae295b3619ea2300c8dc91b872b5eea9818b7a..f75d0668bfdc7d1cca2a72c01b7b7abf11798220 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 d98b221f24da31b6c6bdd4df30c606a66baf8a26..577bbda7ebf608cfdc1d73be6ade8371117cfb03 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -255,7 +255,7 @@ print '<td class="liste_titre" align="right">'.$langs->trans("ECMNbOfDocsSmall") print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshauto">'.img_picto($langs->trans("Refresh"),'refresh').'</a>'; print '</td>'; print '<td class="liste_titre" align="right">'; -if ($user->rights->ecm->create) +if ($user->rights->ecm->setup) { print '<a href="'.DOL_URL_ROOT.'/ecm/docdir?action=create">'.img_picto($langs->trans("ECMNewSection"),'edit_add').'</a>'; }