Merge pull request #15 from halkyon/permission-check

Allow specifying the permission for dev/check
This commit is contained in:
Stig Lindqvist 2015-04-09 11:42:45 +12:00
commit 98126dc448

View File

@ -6,10 +6,15 @@ class DevCheckController extends Controller {
'index' 'index'
); );
/**
* @var string Permission code to check for access to this controller.
*/
private static $permission = 'ADMIN';
function index($request) { function index($request) {
$suiteName = $request->param('Suite') ? $request->param('Suite') : 'check'; $suiteName = $request->param('Suite') ? $request->param('Suite') : 'check';
$e = new EnvironmentChecker($suiteName, 'Environment status'); $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; return $e;
} }
} }