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

@@ -37,5 +37,5 @@ class Constants
/**
* Used in multiple views
*/
public const HOMEPAGE = 'https://v2.kimai.org';
public const HOMEPAGE = 'https://www.kimai.org';
}

View File

@@ -70,7 +70,6 @@ class InvoiceController extends AbstractController
$query->setOrder(InvoiceQuery::ORDER_ASC);
$query->setBegin($begin);
$query->setEnd($end);
$query->setUser($this->getUser());
$query->setState(InvoiceQuery::STATE_STOPPED);
return $query;

View File

@@ -120,7 +120,7 @@ class TimesheetEditForm extends AbstractType
]);
} else {
$builder->add('end', DateTimePickerType::class, [
'label' => 'label.begin',
'label' => 'label.end',
'model_timezone' => $timezone,
'view_timezone' => $timezone,
'required' => false,

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;