Skip to content

Commit

Permalink
Removido not validação isAuthorized
Browse files Browse the repository at this point in the history
No exemplo o usuário só entrará se a validação do parent (appController) retornar falso, que no caso é errado, pois ele deverá validar, se o retorno for realmente true.
  • Loading branch information
possamai committed Sep 29, 2014
1 parent dbceb51 commit 1e7a147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pt/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ e adicione o seguinte conteúdo::
// app/Controller/PostsController.php

public function isAuthorized($user) {
if (!parent::isAuthorized($user)) {
if (parent::isAuthorized($user)) {
if ($this->action === 'add') {
// Todos os usuários registrados podem criar posts
return true;
Expand Down

0 comments on commit 1e7a147

Please sign in to comment.