allow the drag and drop of an event only for allowed users

The drag and drop of the event didn't take into account the user rights.
This commit is contained in:
De Coninck Laurent 2017-02-16 07:51:46 +01:00
parent 04d73668cc
commit 979a5e70bf

View File

@ -1328,7 +1328,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$cssclass.= " unmovable";
}
}
else $cssclass.= " movable";
else{
if ($user->rights->agenda->allactions->create ||
(($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create))
{
$cssclass.= " movable";
}else{
$cssclass.= " unmovable";
}
}
$h=''; $nowrapontd=1;
if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; }