<commit_before><?php
/*
*  このコンポーネントの呼び出しは、AuthComponent, SecurityComponentの前!!
*/
class AuthSettingComponent extends Object {

	public function startup(&$controller) {
		if (!empty($controller->params[Configure::read('Routing.admin')])) {
			$this->__adminSettings($controller);
		} else {
			$this->__authSettings($controller);
		}
	}
	
	private function __authSettings(&$controller) {
		if (isset($controller->Auth)) {
			$controller->Auth->userModel = 'User';
			$controller->Auth->fields = array('username' => 'email', 'password' => '<PASSWORD>');
			$controller->Auth->userScope = array('User.disabled' => 0);
			$controller->Auth->loginAction = array(Configure::read('Routing.admin') => false, 'plugin' => 'account_manager', 'controller' => 'users', 'action' => 'login');
			$controller->Auth->allow('*');
			$controller->Auth->deny('add', 'edit', 'delete');
		}<commit_msg>beforFilter -> initialize<commit_after><?php
/*
*  このコンポーネントの呼び出しは、AuthComponent, SecurityComponentの後ろ!!
*/
class AuthSettingComponent extends Object {
	private $useAdminRouting = false;

	public function initialize(&$controller) {
		if (Configure::read('Routing.admin') && !empty($controller->params[Configure::read('Routing.admin')])) {
			$this->__adminSettings($controller);
		} else {
			$this->__authSettings($controller);
		}
	}
	
	private function __authSettings(&$controller) {
		if (isset($controller->Auth)) {
			$controller->Auth->userModel = 'User';
			$controller->Auth->fields = array('username' => 'email', 'password' => '<PASSWORD>');
			$controller->Auth->userScope = array('User.disabled' => 0);
			$controller->Auth->loginAction = array(Configure::read('Routing.admin') => false, 'plugin' => 'account_manager', 'controller' => 'users', 'action' => 'login');
			$controller->Auth->allow('*');
			$controller->Auth->deny('add', 'edit', 'delete');
		}
{'fraction_non_alphanumeric': 0.2055164954029205, 'fraction_numerical': 0.001081665765278529, 'mean_word_length': 5.902985074626866, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 52, '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': '7044692', 'n_tokens_mistral': 622, 'n_tokens_neox': 576, 'n_words': 91}