Ajout de permissions

This commit is contained in:
Regis Houssin 2005-12-07 15:21:29 +00:00
parent 2d2096149c
commit 61ac0516fc
2 changed files with 16 additions and 5 deletions

View File

@ -315,8 +315,11 @@ if ($_GET["id"] || $_GET["ref"])
if ($_GET["action"] != 'add_price') {
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$product->id.'&amp;action=add_price">';
print $langs->trans("AddSupplier").'</a>';
if (!$user->rights->produit->creer)
{
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$product->id.'&amp;action=add_price">';
print $langs->trans("AddSupplier").'</a>';
}
}

View File

@ -2,7 +2,8 @@
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com>
*
* 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 "<div class=\"tabsAction\">\n";
if ($_GET["action"] == '' )
{
print '<a class="tabAction" href="product.php?id='.$product->id.'&amp;action=transfert">Transfert</a>';
print '<a class="tabAction" href="product.php?id='.$product->id.'&amp;action=correction">Correction stock</a>';
if (!$user->rights->stock->mouvement->creer)
{
print '<a class="tabAction" href="product.php?id='.$product->id.'&amp;action=transfert">Transfert</a>';
}
if (!$user->rights->stock->creer)
{
print '<a class="tabAction" href="product.php?id='.$product->id.'&amp;action=correction">Correction stock</a>';
}
}
print '</div>';