Fix: bad user rights
This commit is contained in:
parent
e4188bf026
commit
d3e8f6f3f9
@ -107,22 +107,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||||
|
|
||||||
// To verify role of users
|
// To verify role of users
|
||||||
$userAccess = 0;
|
$userAccess = $projectstatic->restrictedProjectArea($user);
|
||||||
foreach(array('internal','external') as $source)
|
|
||||||
{
|
|
||||||
$userRole = $projectstatic->liste_contact(4,$source);
|
|
||||||
$num=sizeof($userRole);
|
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
if ($userRole[$i]['code'] == 'PROJECTLEADER' && $user->id == $userRole[$i]['id'])
|
|
||||||
{
|
|
||||||
$userAccess++;
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$head = task_prepare_head($task);
|
$head = task_prepare_head($task);
|
||||||
dol_fiche_head($head, 'note', $langs->trans('Task'), 0, 'projecttask');
|
dol_fiche_head($head, 'note', $langs->trans('Task'), 0, 'projecttask');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user