Fix: Permission check on event tabs
This commit is contained in:
parent
b6d5ebf81d
commit
a674af5bcd
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user