Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Deprecate features in SecurityComponent
These features are available in CakeRequest now. The CakeRequest
version is improved as it raises more appropriate exceptions.
  • Loading branch information
markstory committed Feb 9, 2013
1 parent 74b9cdb commit e4110b1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/Cake/Controller/Component/SecurityComponent.php
Expand Up @@ -49,6 +49,7 @@ class SecurityComponent extends Component {
* List of controller actions for which a POST request is required
*
* @var array
* @deprecated Use CakeRequest::onlyAllow() instead.
* @see SecurityComponent::requirePost()
*/
public $requirePost = array();
Expand All @@ -57,6 +58,7 @@ class SecurityComponent extends Component {
* List of controller actions for which a GET request is required
*
* @var array
* @deprecated Use CakeRequest::onlyAllow() instead.
* @see SecurityComponent::requireGet()
*/
public $requireGet = array();
Expand All @@ -65,6 +67,7 @@ class SecurityComponent extends Component {
* List of controller actions for which a PUT request is required
*
* @var array
* @deprecated Use CakeRequest::onlyAllow() instead.
* @see SecurityComponent::requirePut()
*/
public $requirePut = array();
Expand All @@ -73,6 +76,7 @@ class SecurityComponent extends Component {
* List of controller actions for which a DELETE request is required
*
* @var array
* @deprecated Use CakeRequest::onlyAllow() instead.
* @see SecurityComponent::requireDelete()
*/
public $requireDelete = array();
Expand Down Expand Up @@ -131,7 +135,9 @@ class SecurityComponent extends Component {
public $unlockedFields = array();

/**
* Actions to exclude from any security checks
* Actions to exclude from CSRF and POST validation checks.
* Other checks like requireAuth(), requireSecure(),
* requirePost(), requireGet() etc. will still be applied.
*
* @var array
*/
Expand Down Expand Up @@ -248,6 +254,7 @@ public function startup(Controller $controller) {
* Sets the actions that require a POST request, or empty for all actions
*
* @return void
* @deprecated Use CakeRequest::onlyAllow() instead.
* @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requirePost
*/
public function requirePost() {
Expand All @@ -258,6 +265,7 @@ public function requirePost() {
/**
* Sets the actions that require a GET request, or empty for all actions
*
* @deprecated Use CakeRequest::onlyAllow() instead.
* @return void
*/
public function requireGet() {
Expand All @@ -268,6 +276,7 @@ public function requireGet() {
/**
* Sets the actions that require a PUT request, or empty for all actions
*
* @deprecated Use CakeRequest::onlyAllow() instead.
* @return void
*/
public function requirePut() {
Expand All @@ -278,6 +287,7 @@ public function requirePut() {
/**
* Sets the actions that require a DELETE request, or empty for all actions
*
* @deprecated Use CakeRequest::onlyAllow() instead.
* @return void
*/
public function requireDelete() {
Expand Down

0 comments on commit e4110b1

Please sign in to comment.