isAuthorized

Controller

Controller.phpdownload

public function isAuthorized($user = null){

	$action = $this->request->params['action'];

	if(in_array($action, ['index','アクション1','アクション2'])){

		return true;
	}

	if($user['role'] === 'admin'){

	 	return true;
	}

	return false;
}
© 2025 wayday