mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
40 lines
762 B
PHP
40 lines
762 B
PHP
<?php
|
|
|
|
class DevCheckController extends Controller
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
public static $allowed_actions = array(
|
|
'index'
|
|
);
|
|
|
|
/**
|
|
* Permission code to check for access to this controller.
|
|
*
|
|
* @var string
|
|
*/
|
|
private static $permission = 'ADMIN';
|
|
|
|
/**
|
|
* @param SS_HTTPRequest $request
|
|
*
|
|
* @return EnvironmentChecker
|
|
*
|
|
* @throws SS_HTTPResponse_Exception
|
|
*/
|
|
public function index($request)
|
|
{
|
|
$suite = 'check';
|
|
|
|
if ($name = $request->param('Suite')) {
|
|
$suite = $name;
|
|
}
|
|
|
|
$checker = new EnvironmentChecker($suite, 'Environment status');
|
|
$checker->init($this->config()->permission);
|
|
|
|
return $checker;
|
|
}
|
|
}
|