Fix: Permission check on event tabs

This commit is contained in:
Laurent Destailleur 2013-09-24 11:11:59 +02:00
parent b6d5ebf81d
commit a674af5bcd
3 changed files with 10 additions and 9 deletions

View File

@ -43,23 +43,24 @@ $confirm = GETPOST('confirm');
$lineid = GETPOST('lineid','int');
// Security check
$socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id;
if ($user->societe_id > 0)
{
unset($_GET["action"]);
$action='';
$socid = $user->societe_id;
}
$result = restrictedArea($user, 'agenda', $objectid, 'actioncomm&societe', 'myactions&allactions', 'fk_soc', 'id');
$object = new ActionComm($db);
/*
* Actions
*/
/*
* Ajout d'un nouveau contact
*/
// Add new nouveau contact
if ($action == 'addcontact')
{
$result = $object->fetch($id);

View File

@ -44,14 +44,14 @@ $objectid = GETPOST('id','int');
$action=GETPOST('action','alpha');
// Security check
$socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id;
if ($user->societe_id > 0)
{
unset($_GET["action"]);
$action='';
$socid = $user->societe_id;
}
$result = restrictedArea($user, 'agenda', $objectid, 'actioncomm&societe', 'myactions&allactions', '', 'id');
$result = restrictedArea($user, 'agenda', $objectid, 'actioncomm&societe', 'myactions&allactions', 'fk_soc', 'id');
$act = new ActionComm($db);

View File

@ -40,7 +40,7 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions&allactions', '', 'id');
$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions&allactions', 'fk_soc', 'id');
/*