Skip to content

Commit 39f7304

Browse files
authored
Merge pull request #1238 from didoda/fix/modules-access-control
Fix modules access control: use BEM roles only
2 parents a20811b + 366016e commit 39f7304

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Controller/Component/ModulesComponent.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ protected function modulesByAccessControl(): void
186186
if (empty($user) || empty($user->getOriginalData())) {
187187
return;
188188
}
189-
190-
$roles = (array)$user->get('roles');
189+
$roles = array_intersect(array_keys($accessControl), (array)$user->get('roles'));
191190
$modules = (array)array_keys($this->modules);
192191
$hidden = [];
193192
$readonly = [];

0 commit comments

Comments
 (0)