Merge pull request #8227 from ravage84/2.x-requireauth-deprecation

Deprecate SecurityComponent::requireAuth & SecurityComponent::require…
This commit is contained in:
Mark Story 2016-02-10 10:34:56 -05:00
commit ddc71efb54

View file

@ -92,6 +92,7 @@ class SecurityComponent extends Component {
* *
* @var array * @var array
* @see SecurityComponent::requireAuth() * @see SecurityComponent::requireAuth()
* @deprecated 2.8.1 This feature is confusing and not useful.
*/ */
public $requireAuth = array(); public $requireAuth = array();
@ -400,6 +401,7 @@ class SecurityComponent extends Component {
* *
* @param Controller $controller Instantiating controller * @param Controller $controller Instantiating controller
* @return bool|null True if authentication required * @return bool|null True if authentication required
* @deprecated 2.8.1 This feature is confusing and not useful.
*/ */
protected function _authRequired(Controller $controller) { protected function _authRequired(Controller $controller) {
if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($this->request->data)) { if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($this->request->data)) {