mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
New: Bouton supprimer affich en gris si permissions insuffisantes
This commit is contained in:
@@ -140,7 +140,7 @@ class Form
|
||||
}
|
||||
$s.='</tr></table>';
|
||||
}
|
||||
return $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -83,3 +83,4 @@ DomainUser=Domain user %s
|
||||
Reactivate=Reactivate
|
||||
CreateInternalUserDesc=This form allows you to creat an user internal to your company/fundation. To creat an external user (customer, supplier, ...), use button 'Create Dolibarr user' from third party's contact card.
|
||||
InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/fundation.<br>An <b>external</b> user is a customer, supplier or other.<br><br>In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display)
|
||||
PermissionInheritedFromAGroup=Permission granted because ineherited from one of a user's group.
|
||||
|
||||
@@ -83,3 +83,4 @@ DomainUser=Utilisateur du domaine %s
|
||||
Reactivate=R<>activer
|
||||
CreateInternalUserDesc=Cet <20>cran permet de cr<63>er un utilisateur interne <20> votre soci<63>t<EFBFBD>/institution. Pour cr<63>er un utilisateur externe (client, fournisseur, ...), utiliser le bouton 'Cr<43>er utilisateur Dolibarr' qui se trouve sur la fiche contact du tiers en question.
|
||||
InternalExternalDesc=Un utilisateur <b>interne</b> est un utilisateur appartenant <20> votre soci<63>t<EFBFBD>/institution.<br>Un utilisateur <b>externe</b> est un utilisateur client, fournisseur ou autre.<br><br>Dans les 2 cas, les permissions utilisateurs d<>finissent les droits d'acc<63>s mais l'utilisateur externe peut en plus avoir un gestionnaire de menu diff<66>rent de l'utilisateur interne (Voir Accueil - Configuration - Affichage)
|
||||
PermissionInheritedFromAGroup=La permission est accord<72>e car h<>rit<69>e d'un groupe auquel appartient l'utilisateur.
|
||||
|
||||
@@ -1068,37 +1068,47 @@ print "\n<div class=\"tabsAction\">\n";
|
||||
|
||||
if ($_GET["action"] == '')
|
||||
{
|
||||
if ( $user->rights->produit->creer)
|
||||
{
|
||||
if ($product->no_button_edit <> 1)
|
||||
print '<a class="butAction" href="fiche.php?action=edit&id='.$product->id.'">'.$langs->trans("Edit").'</a>';
|
||||
if ( $user->rights->produit->creer)
|
||||
{
|
||||
if ($product->no_button_edit <> 1)
|
||||
print '<a class="butAction" href="fiche.php?action=edit&id='.$product->id.'">'.$langs->trans("Edit").'</a>';
|
||||
|
||||
if ($product->no_button_copy <> 1)
|
||||
print '<a class="butAction" href="fiche.php?action=clone&id='.$product->id.'">'.$langs->trans("CreateCopy").'</a>';
|
||||
}
|
||||
if ($product->no_button_copy <> 1)
|
||||
print '<a class="butAction" href="fiche.php?action=clone&id='.$product->id.'">'.$langs->trans("CreateCopy").'</a>';
|
||||
}
|
||||
|
||||
/*
|
||||
if ($product->isproduct() && $user->rights->commande->creer)
|
||||
{
|
||||
$langs->load('orders');
|
||||
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
||||
print $langs->trans("CreateCustomerOrder").'</a>';
|
||||
}
|
||||
/*
|
||||
if ($product->isproduct() && $user->rights->commande->creer)
|
||||
{
|
||||
$langs->load('orders');
|
||||
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
||||
print $langs->trans("CreateCustomerOrder").'</a>';
|
||||
}
|
||||
|
||||
if ($product->isproduct() && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$langs->load('orders');
|
||||
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
||||
print $langs->trans("CreateSupplierOrder").'</a>';
|
||||
}
|
||||
*/
|
||||
|
||||
$product_is_used = $product->verif_prod_use($product->id);
|
||||
if ($user->rights->produit->supprimer && ! $product_is_used && $product->no_button_delete <> 1)
|
||||
{
|
||||
print '<a class="butActionDelete" href="fiche.php?action=delete&id='.$product->id.'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
if ($product->isproduct() && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$langs->load('orders');
|
||||
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
||||
print $langs->trans("CreateSupplierOrder").'</a>';
|
||||
}
|
||||
*/
|
||||
|
||||
$product_is_used = $product->verif_prod_use($product->id);
|
||||
if ($user->rights->produit->supprimer)
|
||||
{
|
||||
if (! $product_is_used && $product->no_button_delete <> 1)
|
||||
{
|
||||
print '<a class="butActionDelete" href="fiche.php?action=delete&id='.$product->id.'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("ProductIsUsed").'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print "\n</div><br>\n";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -19,7 +19,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -76,16 +75,16 @@ if ($_GET["action"] == 'delrights' && $caneditperms)
|
||||
|
||||
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("Permissions"));
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Visu et edition */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
llxHeader('',$langs->trans("Permissions"));
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$fuser = new User($db, $_GET["id"]);
|
||||
$fuser->fetch();
|
||||
$fuser->getrights();
|
||||
@@ -294,7 +293,10 @@ if ($result)
|
||||
// Permission own by group
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center">'.$langs->trans("Group").'</td>';
|
||||
print '<td align="center">';
|
||||
print $form->textwithtooltip($langs->trans("Group"),$langs->trans("PermissionInheritedFromAGroup"));
|
||||
//print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id.'" title="'.$langs->trans("PermissionInheritedFromAGroup").'">';
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="center" nowrap>';
|
||||
print img_tick();
|
||||
|
||||
Reference in New Issue
Block a user