feat: open the logs to every administrative role

This commit is contained in:
fromme committed 2026-10-14 12:41:57 +02:00
1 parent ade30c6b06
commit 1a733a6ba6
9 files changed
+28 -22

No files matched your search

@@ -17,7 +17,8 @@ interface DashboardWidgetProviderInterface
{
/**
* The role this widget requires, checked with isGranted() — so a widget requiring
* ROLE_GROUPS_MANAGER also appears for the roles above it in the hierarchy.
* ROLE_GROUPS_MANAGER also appears for the roles above it in the hierarchy. A voter
* attribute such as ADMINISTRATIVE_ACCESS works too, for a widget every admin-area role sees.
*/
public function getRequiredRole(): string;
@@ -9,7 +9,7 @@ use App\Entity\LogEntry;
use App\Model\DashboardWidget;
use App\Model\DashboardWidgetEntry;
use App\Repository\LogEntryRepository;
use App\Security\Role;
use App\Security\Voter\AdministrativeAccessVoter;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
@@ -37,7 +37,7 @@ class RecentLogEntriesWidgetProvider implements DashboardWidgetProviderInterface
public function getRequiredRole(): string
{
return Role::CUSTOMER_EXPERT;
return AdministrativeAccessVoter::ADMINISTRATIVE_ACCESS;
}
public function getPriority(): int