From d3e8f6f3f98231c6088881cac0bf1024ec0f2427 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 24 Feb 2010 15:38:05 +0000 Subject: [PATCH] Fix: bad user rights --- htdocs/projet/tasks/note.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 29c785331d3..6a7b8b202fc 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -107,22 +107,7 @@ if ($id > 0 || ! empty($ref)) if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); // To verify role of users - $userAccess = 0; - 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++; - } - } + $userAccess = $projectstatic->restrictedProjectArea($user); $head = task_prepare_head($task); dol_fiche_head($head, 'note', $langs->trans('Task'), 0, 'projecttask');