post release fixes (#584)

This commit is contained in:
Kevin Papst
2019-02-22 17:20:41 +01:00
committed by GitHub
parent fd4a87e3a6
commit 239be527b8
7 changed files with 16 additions and 8 deletions

View File

@@ -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;