Skip to content

Commit

Permalink
Add back end module check (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg authored Dec 19, 2024
1 parent a44f492 commit cab822f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EventListener/UserNavigationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public function onLoadLanguageFile(string $name): void
*/
public function onGetUserNavigation(array $modules): array
{
if (!$this->authorizationChecker->isGranted(ContaoCorePermissions::USER_CAN_ACCESS_MODULE, 'lead')) {
return $modules;
}

$forms = $this->getForms();

if (empty($forms)) {
Expand Down

0 comments on commit cab822f

Please sign in to comment.