From 61ac0516fc061ff3d2e7e911e6b224c0eb2c8aff Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 7 Dec 2005 15:21:29 +0000 Subject: [PATCH] Ajout de permissions --- htdocs/product/fournisseurs.php | 7 +++++-- htdocs/product/stock/product.php | 14 +++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index fe84a0df243..b13ee4a98c8 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -315,8 +315,11 @@ if ($_GET["id"] || $_GET["ref"]) if ($_GET["action"] != 'add_price') { - print ''; - print $langs->trans("AddSupplier").''; + if (!$user->rights->produit->creer) + { + print ''; + print $langs->trans("AddSupplier").''; + } } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 077f71f3454..e14548ffc6d 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -2,7 +2,8 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005 Simon TOSSER + * Copyright (C) 2005 Simon TOSSER + * Copyright (C) 2005 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -401,8 +402,15 @@ print "
\n"; if ($_GET["action"] == '' ) { - print 'Transfert'; - print 'Correction stock'; + if (!$user->rights->stock->mouvement->creer) + { + print 'Transfert'; + } + + if (!$user->rights->stock->creer) + { + print 'Correction stock'; + } } print '
';