Secu: Protection ecran creation socit si droit absent

This commit is contained in:
Laurent Destailleur 2005-09-21 20:28:36 +00:00
parent a3baf4ab4b
commit 229d949952

View File

@ -33,10 +33,15 @@ require("pre.inc.php");
$user->getrights('societe');
$langs->load("companies");
if (! $user->rights->societe->creer)
{
if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
{
accessforbidden();
}
}
/*
* Sécurité accés client
*/
// Sécurité accés client
if ($user->societe_id > 0)
{
$_GET["action"] = '';
@ -46,6 +51,8 @@ if ($user->societe_id > 0)
$soc = new Societe($db);
/*
* Actions
*/