SQL and performance improvements (#2017)

This commit is contained in:
Kevin Papst
2020-10-23 00:31:53 +02:00
committed by GitHub
parent 6ed7ee76e7
commit 4533c994a3
14 changed files with 216 additions and 206 deletions

View File

@@ -78,6 +78,7 @@ final class PermissionController extends AbstractController
$role->setName($roleName);
$this->roleRepository->saveRole($role);
$existing[] = $roleName;
$all[] = $role;
}
}
@@ -145,7 +146,7 @@ final class PermissionController extends AbstractController
'ROLE_TEAMLEAD' => null,
'ROLE_USER' => null,
];
foreach ($this->roleRepository->findAll() as $role) {
foreach ($all as $role) {
$roles[$role->getName()] = $role;
}