post release fixes (#584)
This commit is contained in:
@@ -119,8 +119,17 @@ class TimesheetVoter extends AbstractVoter
|
||||
*/
|
||||
protected function canStart(Timesheet $timesheet, User $user, TokenInterface $token)
|
||||
{
|
||||
// we could check the amount of active entries
|
||||
// if a teamlead starts an entry for another user, check that this user is part of his team
|
||||
// possible improvements for the future:
|
||||
// we could check the amount of active entries (maybe slow)
|
||||
// if a teamlead starts an entry for another user, check that this user is part of his team (needs to be done for teams)
|
||||
|
||||
if (null === $timesheet->getActivity()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (null === $timesheet->getProject()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$timesheet->getActivity()->getVisible() || !$timesheet->getProject()->getVisible()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user