New: Bouton supprimer affich en gris si permissions insuffisantes
This commit is contained in:
parent
596fe65152
commit
7e71fe59f4
@ -140,7 +140,7 @@ class Form
|
|||||||
}
|
}
|
||||||
$s.='</tr></table>';
|
$s.='</tr></table>';
|
||||||
}
|
}
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -83,3 +83,4 @@ DomainUser=Domain user %s
|
|||||||
Reactivate=Reactivate
|
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.
|
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)
|
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
|
Reactivate=Réactiver
|
||||||
CreateInternalUserDesc=Cet écran permet de créer un utilisateur interne à votre société/institution. Pour créer un utilisateur externe (client, fournisseur, ...), utiliser le bouton 'Créer utilisateur Dolibarr' qui se trouve sur la fiche contact du tiers en question.
|
CreateInternalUserDesc=Cet écran permet de créer un utilisateur interne à votre société/institution. Pour créer un utilisateur externe (client, fournisseur, ...), utiliser le bouton 'Créer utilisateur Dolibarr' qui se trouve sur la fiche contact du tiers en question.
|
||||||
InternalExternalDesc=Un utilisateur <b>interne</b> est un utilisateur appartenant à votre société/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ès mais l'utilisateur externe peut en plus avoir un gestionnaire de menu différent de l'utilisateur interne (Voir Accueil - Configuration - Affichage)
|
InternalExternalDesc=Un utilisateur <b>interne</b> est un utilisateur appartenant à votre société/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ès mais l'utilisateur externe peut en plus avoir un gestionnaire de menu différent de l'utilisateur interne (Voir Accueil - Configuration - Affichage)
|
||||||
|
PermissionInheritedFromAGroup=La permission est accordée car héritée d'un groupe auquel appartient l'utilisateur.
|
||||||
|
|||||||
@ -1068,37 +1068,47 @@ print "\n<div class=\"tabsAction\">\n";
|
|||||||
|
|
||||||
if ($_GET["action"] == '')
|
if ($_GET["action"] == '')
|
||||||
{
|
{
|
||||||
if ( $user->rights->produit->creer)
|
if ( $user->rights->produit->creer)
|
||||||
{
|
{
|
||||||
if ($product->no_button_edit <> 1)
|
if ($product->no_button_edit <> 1)
|
||||||
print '<a class="butAction" href="fiche.php?action=edit&id='.$product->id.'">'.$langs->trans("Edit").'</a>';
|
print '<a class="butAction" href="fiche.php?action=edit&id='.$product->id.'">'.$langs->trans("Edit").'</a>';
|
||||||
|
|
||||||
if ($product->no_button_copy <> 1)
|
if ($product->no_button_copy <> 1)
|
||||||
print '<a class="butAction" href="fiche.php?action=clone&id='.$product->id.'">'.$langs->trans("CreateCopy").'</a>';
|
print '<a class="butAction" href="fiche.php?action=clone&id='.$product->id.'">'.$langs->trans("CreateCopy").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ($product->isproduct() && $user->rights->commande->creer)
|
if ($product->isproduct() && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$langs->load('orders');
|
$langs->load('orders');
|
||||||
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
||||||
print $langs->trans("CreateCustomerOrder").'</a>';
|
print $langs->trans("CreateCustomerOrder").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($product->isproduct() && $user->rights->fournisseur->commande->creer)
|
if ($product->isproduct() && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$langs->load('orders');
|
$langs->load('orders');
|
||||||
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
print '<a class="butAction" href="fiche.php?action=fastappro&id='.$product->id.'">';
|
||||||
print $langs->trans("CreateSupplierOrder").'</a>';
|
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>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$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";
|
print "\n</div><br>\n";
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.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>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,16 +75,16 @@ if ($_GET["action"] == 'delrights' && $caneditperms)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader('',$langs->trans("Permissions"));
|
|
||||||
|
|
||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Visu et edition */
|
/* Visu et edition */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
llxHeader('',$langs->trans("Permissions"));
|
||||||
|
|
||||||
|
$form=new Form($db);
|
||||||
|
|
||||||
$fuser = new User($db, $_GET["id"]);
|
$fuser = new User($db, $_GET["id"]);
|
||||||
$fuser->fetch();
|
$fuser->fetch();
|
||||||
$fuser->getrights();
|
$fuser->getrights();
|
||||||
@ -294,7 +293,10 @@ if ($result)
|
|||||||
// Permission own by group
|
// Permission own by group
|
||||||
if ($caneditperms)
|
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 '<td align="center" nowrap>';
|
||||||
print img_tick();
|
print img_tick();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user