Skip to content

Commit

Permalink
Merge branch '6.x' into optionalResetting
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanmac committed Oct 24, 2022
2 parents 30e08c6 + 54e7f6c commit c35a715
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"psalm/plugin-phpunit": "^0.17",
"psalm/plugin-symfony": "^3.0",
"rector/rector": "^0.14",
"sonata-project/admin-bundle": "^4.9",
"sonata-project/admin-bundle": "^4.20",
"sonata-project/block-bundle": "^4.11",
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.0",
Expand All @@ -76,7 +76,7 @@
"vimeo/psalm": "^4.9.2"
},
"conflict": {
"sonata-project/admin-bundle": "<4.9",
"sonata-project/admin-bundle": "<4.20",
"sonata-project/block-bundle": "<4.11",
"sonata-project/doctrine-orm-admin-bundle": "<4.0"
},
Expand Down
6 changes: 3 additions & 3 deletions src/Security/RolesBuilder/AdminRolesBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public function addExcludeAdmin(string $exclude): void
public function getRoles(?string $domain = null): array
{
$adminRoles = [];
foreach ($this->pool->getAdminServiceIds() as $id) {
if (\in_array($id, $this->excludeAdmins, true)) {
foreach ($this->pool->getAdminServiceCodes() as $code) {
if (\in_array($code, $this->excludeAdmins, true)) {
continue;
}

$admin = $this->pool->getInstance($id);
$admin = $this->pool->getInstance($code);
$securityHandler = $admin->getSecurityHandler();
$baseRole = $securityHandler->getBaseRole($admin);
foreach (array_keys($admin->getSecurityInformation()) as $key) {
Expand Down
2 changes: 1 addition & 1 deletion tests/custom_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Filesystem\Filesystem;

$kernel = new AppKernel($_SERVER['APP_ENV'] ?? 'dev', (bool) ($_SERVER['APP_DEBUG'] ?? true));
$kernel = new AppKernel($_SERVER['APP_ENV'] ?? 'test', (bool) ($_SERVER['APP_DEBUG'] ?? false));
$application = new Application($kernel);
$application->setAutoExit(false);

Expand Down

0 comments on commit c35a715

Please sign in to comment.