release 2.0 beta 2 (#3757)
* do not traverse into invoice template subdirectories (#3735) * fix security open api definition * fix currency can be null, removed fluent interface * merged release 1.30.3 * allow to pre-fill timesheet metafields via URL * fix api description * added test accounts with simpler names and password * upgrade to Symfony 6.2 * removed FrameworkExtraBundle (by Sensio) and replaced with new native SF annotations * fixed symfony 6.2 deprecations * fixed #3768
This commit is contained in:
@@ -21,19 +21,19 @@ use App\Form\TimesheetMultiUserEditForm;
|
||||
use App\Repository\Query\TimesheetQuery;
|
||||
use App\Utils\PageSetup;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
#[Route(path: '/team/timesheet')]
|
||||
#[Security("is_granted('view_other_timesheet')")]
|
||||
#[IsGranted('view_other_timesheet')]
|
||||
final class TimesheetTeamController extends TimesheetAbstractController
|
||||
{
|
||||
#[Route(path: '/', defaults: ['page' => 1], name: 'admin_timesheet', methods: ['GET'])]
|
||||
#[Route(path: '/page/{page}', requirements: ['page' => '[1-9]\d*'], name: 'admin_timesheet_paginated', methods: ['GET'])]
|
||||
#[Security("is_granted('view_other_timesheet')")]
|
||||
#[IsGranted('view_other_timesheet')]
|
||||
public function indexAction(int $page, Request $request): Response
|
||||
{
|
||||
$query = $this->createDefaultQuery();
|
||||
@@ -43,35 +43,35 @@ final class TimesheetTeamController extends TimesheetAbstractController
|
||||
}
|
||||
|
||||
#[Route(path: '/export/', name: 'admin_timesheet_export', methods: ['GET', 'POST'])]
|
||||
#[Security("is_granted('export_other_timesheet')")]
|
||||
#[IsGranted('export_other_timesheet')]
|
||||
public function exportAction(Request $request, ServiceExport $serviceExport): Response
|
||||
{
|
||||
return $this->export($request, $serviceExport);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/edit', name: 'admin_timesheet_edit', methods: ['GET', 'POST'])]
|
||||
#[Security("is_granted('edit', entry)")]
|
||||
#[IsGranted('edit', 'entry')]
|
||||
public function editAction(Timesheet $entry, Request $request): Response
|
||||
{
|
||||
return $this->edit($entry, $request);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/duplicate', name: 'admin_timesheet_duplicate', methods: ['GET', 'POST'])]
|
||||
#[Security("is_granted('duplicate', entry)")]
|
||||
#[IsGranted('duplicate', 'entry')]
|
||||
public function duplicateAction(Timesheet $entry, Request $request): Response
|
||||
{
|
||||
return $this->duplicate($entry, $request);
|
||||
}
|
||||
|
||||
#[Route(path: '/create', name: 'admin_timesheet_create', methods: ['GET', 'POST'])]
|
||||
#[Security("is_granted('create_other_timesheet')")]
|
||||
#[IsGranted('create_other_timesheet')]
|
||||
public function createAction(Request $request): Response
|
||||
{
|
||||
return $this->create($request);
|
||||
}
|
||||
|
||||
#[Route(path: '/create_mu', name: 'admin_timesheet_create_multiuser', methods: ['GET', 'POST'])]
|
||||
#[Security("is_granted('create_other_timesheet')")]
|
||||
#[IsGranted('create_other_timesheet')]
|
||||
public function createForMultiUserAction(Request $request): Response
|
||||
{
|
||||
$entry = new MultiUserTimesheet();
|
||||
@@ -150,14 +150,14 @@ final class TimesheetTeamController extends TimesheetAbstractController
|
||||
}
|
||||
|
||||
#[Route(path: '/multi-update', name: 'admin_timesheet_multi_update', methods: ['POST'])]
|
||||
#[Security("is_granted('edit_other_timesheet')")]
|
||||
#[IsGranted('edit_other_timesheet')]
|
||||
public function multiUpdateAction(Request $request): Response
|
||||
{
|
||||
return $this->multiUpdate($request);
|
||||
}
|
||||
|
||||
#[Route(path: '/multi-delete', name: 'admin_timesheet_multi_delete', methods: ['POST'])]
|
||||
#[Security("is_granted('delete_other_timesheet')")]
|
||||
#[IsGranted('delete_other_timesheet')]
|
||||
public function multiDeleteAction(Request $request): Response
|
||||
{
|
||||
return $this->multiDelete($request);
|
||||
|
||||
Reference in New Issue
Block a user