From cc14aca5231a990c63a1d5234794c1af953b39e6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 26 May 2006 14:07:44 +0000 Subject: [PATCH] Ajout de restriction --- htdocs/product/categorie.php | 23 +++++++++++++---------- htdocs/product/document.php | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/htdocs/product/categorie.php b/htdocs/product/categorie.php index a3da1b2ae43..140b26780fe 100644 --- a/htdocs/product/categorie.php +++ b/htdocs/product/categorie.php @@ -210,16 +210,19 @@ if ($_GET["id"] || $_GET["ref"]) // Formulaire ajout dans une categorie - print '
'; - print '
'; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("ClassifyInCategory").' '; - print $html->select_all_categories($categorie->id_mere).'
'; - print '
'; - print '
'; + if ($user->rights->produit->creer) + { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("ClassifyInCategory").' '; + print $html->select_all_categories($categorie->id_mere).'
'; + print '
'; + print '
'; + } $c = new Categorie($db); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 5f9fd900e51..86126323522 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -245,7 +245,7 @@ if ($product->id) // Affiche forumlaire upload - if (defined('MAIN_UPLOAD_DOC') && $conf->upload) + if (defined('MAIN_UPLOAD_DOC') && $conf->upload && $user->rights->produit->creer) { print_titre($langs->trans('AttachANewFile'));