<commit_before><?php

class DevCheckController extends Controller {

	public static $allowed_actions = array(
		'index'
	);

	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
		return $e;
	}
}<commit_msg>Allow specifying the permission for dev/check<commit_after><?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;
	}
}
{'fraction_non_alphanumeric': 0.14387755102040817, 'fraction_numerical': 0.0, 'mean_word_length': 4.909638554216867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2331506', 'n_tokens_mistral': 295, 'n_tokens_neox': 278, 'n_words': 84}