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

Fix: ajout des droits d'accès sur les documents

Todo: prévoir un droit de suppression des documents
parent 546a6473
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ $langs->load("categories"); ...@@ -44,6 +44,7 @@ $langs->load("categories");
// Load permissions // Load permissions
$user->getrights('ecm'); $user->getrights('ecm');
if (!$user->rights->ecm->create) accessforbidden();
// Get parameters // Get parameters
$socid = isset($_GET["socid"])?$_GET["socid"]:''; $socid = isset($_GET["socid"])?$_GET["socid"]:'';
......
...@@ -255,7 +255,7 @@ print '<td class="liste_titre" align="right">'.$langs->trans("ECMNbOfDocsSmall") ...@@ -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 '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshauto">'.img_picto($langs->trans("Refresh"),'refresh').'</a>';
print '</td>'; print '</td>';
print '<td class="liste_titre" align="right">'; 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>'; print '<a href="'.DOL_URL_ROOT.'/ecm/docdir?action=create">'.img_picto($langs->trans("ECMNewSection"),'edit_add').'</a>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment