diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 6f1d416c2c9..96f51ca519a 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -156,7 +156,7 @@ $TDurationTypes = array('y' => $langs->trans('Years'), 'm' => $langs->trans('Mon $result = restrictedArea($user, 'agenda', $object, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); -$usercancreate = $user->hasRight('agenda', 'allactions', 'create') || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->hasRight('agenda', 'myactions', 'create')); +$usercancreate = $user->hasRight('agenda', 'allactions', 'create') || ((empty($object->id) || $object->authorid == $user->id || $object->userownerid == $user->id) && $user->hasRight('agenda', 'myactions', 'create')); /* diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 08c2d00dc0f..fcb4a2680e5 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -904,7 +904,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel print '