mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
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:
parent
e66ff40733
commit
0e5613b57b
4 changed files with 102 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue