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