Skip to content

Commit

Permalink
Merge pull request #427 from ViniTou/EZP-28862-system-info-permission
Browse files Browse the repository at this point in the history
EZP-28862: Require an explicit permission for the System Info route
  • Loading branch information
Łukasz Serwatka authored Apr 4, 2018
2 parents d1d3502 + e836825 commit 686464c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bundle/Controller/SystemInfoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
namespace EzSystems\EzPlatformAdminUiBundle\Controller;

use eZ\Publish\Core\MVC\Symfony\Security\Authorization\Attribute;
use EzSystems\EzSupportToolsBundle\SystemInfo\SystemInfoCollectorRegistry;
use Symfony\Component\HttpFoundation\Response;

Expand All @@ -22,6 +23,12 @@ public function __construct(SystemInfoCollectorRegistry $collectorRegistry)
$this->collectorRegistry = $collectorRegistry;
}

public function performAccessCheck()
{
parent::performAccessCheck();
$this->denyAccessUnlessGranted(new Attribute('setup', 'system_info'));
}

/**
* Renders the system information page.
*
Expand Down

0 comments on commit 686464c

Please sign in to comment.