Skip to content

Commit 366016e

Browse files
committed
fix: bem roles only in modulesByAccessControl
1 parent a20811b commit 366016e

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)