diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php index 0daac15e765..aa83b7c1038 100644 --- a/htdocs/ticket/document.php +++ b/htdocs/ticket/document.php @@ -80,7 +80,7 @@ if ($user->socid > 0 && ($object->fk_soc != $user->socid)) { accessforbidden(); } // or for unauthorized internals users -if (!$user->socid && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) { +if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) && $object->fk_user_assign != $user->id && empty($user->rights->ticket->manage)) { accessforbidden(); }