Ajout permissions sur cration et suppression des contacts

This commit is contained in:
Regis Houssin 2005-12-02 11:20:32 +00:00
parent babdcee330
commit 258df5ff21
2 changed files with 24 additions and 3 deletions

View File

@ -471,15 +471,21 @@ elseif ($_GET["id"])
if (! $user->societe_id)
{
print '<div class="tabsAction">';
if ($user->rights->societe->contact->creer)
{
print '<a class="tabAction" href="fiche.php?id='.$contact->id.'&amp;action=edit">'.$langs->trans('Edit').'</a>';
}
if (! $contact->user_id && $user->admin)
{
print '<a class="tabAction" href="fiche.php?id='.$contact->id.'&amp;action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
}
print '<a class="butDelete" href="fiche.php?id='.$contact->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
if ($user->rights->societe->contact->supprimer)
{
print '<a class="butDelete" href="fiche.php?id='.$contact->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
}
print "</div><br>";
}

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* 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
@ -99,6 +100,20 @@ class modSociete extends DolibarrModules
$this->rights[3][2] = 'd'; // type de la permission (déprécié à ce jour)
$this->rights[3][3] = 0; // La permission est-elle une permission par défaut
$this->rights[3][4] = 'supprimer';
$this->rights[4][0] = 261; // id de la permission
$this->rights[4][1] = 'Créer modifier les contacts'; // libelle de la permission
$this->rights[4][2] = 'w'; // type de la permission (déprécié à ce jour)
$this->rights[4][3] = 0; // La permission est-elle une permission par défaut
$this->rights[4][4] = 'contact';
$this->rights[4][5] = 'creer';
$this->rights[5][0] = 262; // id de la permission
$this->rights[5][1] = 'Supprimer les contacts'; // libelle de la permission
$this->rights[5][2] = 'd'; // type de la permission (déprécié à ce jour)
$this->rights[5][3] = 0; // La permission est-elle une permission par défaut
$this->rights[5][4] = 'contact';
$this->rights[5][5] = 'supprimer';
}