Forbid access to homepage if a user has no allow permission

This allows to block access to everything (even the homepage) for anonymous access. This fixes issue #290
This commit is contained in:
Jan Böhmer 2023-08-20 12:33:08 +02:00
parent e66ff40733
commit 0e5613b57b
4 changed files with 102 additions and 7 deletions

View file

@ -66,6 +66,8 @@ class HomepageController extends AbstractController
public function homepage(Request $request, GitVersionInfo $versionInfo, EntityManagerInterface $entityManager,
UpdateAvailableManager $updateAvailableManager): Response
{
$this->denyAccessUnlessGranted('HAS_ACCESS_PERMISSIONS');
if ($this->isGranted('@tools.lastActivity')) {
$table = $this->dataTable->createFromType(
LogDataTable::class,