From 2c0c77df134c01a8f228ef8bd4ae5df9c79880f0 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 9 Apr 2015 11:39:34 +1200 Subject: [PATCH] Allow specifying the permission for dev/check --- code/DevCheckController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/DevCheckController.php b/code/DevCheckController.php index 1c06d2e..1a111d3 100644 --- a/code/DevCheckController.php +++ b/code/DevCheckController.php @@ -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; } }