Skip to content

Commit

Permalink
EZP-28862: Require an explicit permission for the System Info route
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Mar 27, 2018
1 parent 1101d28 commit e836825
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 e836825

Please sign in to comment.