diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 41534d8aac3..f9db2a0e796 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -248,25 +248,6 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f { if (! $user->rights->projet->lire && ! $user->rights->projet->all->lire) { $readok=0; $nbko++; } } - elseif ($feature == 'agenda') - { - if ($objectid > 0) { - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; - $action = new ActionComm($db); - $action->fetch($objectid); - if (empty($user->rights->agenda->allactions->read) && (($action->authorid != $user->id && $action->userownerid != $user->id && !(array_key_exists($user->id, - $action->userassigned))) || empty($user->rights->agenda->myactions->read))) { - $readok = 0; - $nbko++; - } - } - else{ - if (empty($user->rights->agenda->myactions->read) && empty($user->rights->agenda->allactions->read)) { - $readok = 0; - $nbko++; - } - } - } elseif (! empty($feature2)) // This is for permissions on 2 levels { $tmpreadok=1;