Allow specifying the permission for dev/check

This commit is contained in:
Sean Harvey 2015-04-09 11:39:34 +12:00
parent 20f0a2bf88
commit 2c0c77df13
1 changed files with 6 additions and 1 deletions

View File

@ -6,10 +6,15 @@ class DevCheckController extends Controller {
'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('ADMIN'); //check for admin permissions before running this check
$e->init($this->config()->permission); //check for admin permissions before running this check
return $e;
}
}