Skip to content

Commit

Permalink
Added the Security component to the vote form
Browse files Browse the repository at this point in the history
  • Loading branch information
Xety committed Dec 15, 2016
1 parent 61fe2b8 commit 3c7b055
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Controller/BlogController.php
Expand Up @@ -21,6 +21,7 @@ public function initialize()
parent::initialize();

$this->loadComponent('RequestHandler');
$this->loadComponent('Security');
}

/**
Expand All @@ -35,6 +36,7 @@ public function beforeFilter(Event $event)
parent::beforeFilter($event);

$this->Auth->allow(['index', 'category', 'article', 'go', 'archive', 'search']);
$this->Security->config('unlockedActions', ['quote', 'getEditComment', 'articleLike', 'articleUnlike']);
}

/**
Expand Down
11 changes: 11 additions & 0 deletions src/Controller/PollsController.php
Expand Up @@ -6,6 +6,17 @@

class PollsController extends AppController
{
/**
* Initialization hook method.
*
* @return void
*/
public function initialize()
{
parent::initialize();
$this->loadComponent('Security');
}

/**
* An user vote to a poll.
*
Expand Down

0 comments on commit 3c7b055

Please sign in to comment.