Skip to content

Commit

Permalink
Merge pull request #15 from halkyon/permission-check
Browse files Browse the repository at this point in the history
Allow specifying the permission for dev/check
  • Loading branch information
Stig Lindqvist committed Apr 8, 2015
2 parents 20f0a2b + 2c0c77d commit 98126dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/DevCheckController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 98126dc

Please sign in to comment.