Created
May 9, 2013 20:28
-
-
Save hewerthomn/5550336 to your computer and use it in GitHub Desktop.
exemplo de chamada do plugin Acl + Auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* arquivo AppController.php | |
*/ | |
public $components = array( | |
/* outros componentes chamados aqui */ | |
'Acl', | |
'Auth' => array( | |
'authError' => 'O usuário não tem permissão para acessar essa ação', | |
'loginRedirect' => array('controller' => 'pessoas', 'action' => 'inicio', 'admin' => false, 'plugin'=>null), | |
'logoutRedirect' => array('controller' => 'pessoas', 'action' => 'entrar', 'admin' => false, 'plugin'=>null), | |
'loginAction' => array('controller' => 'pessoas', 'action' => 'entrar', 'admin' => false, 'plugin'=>null), | |
'authorize' => array( | |
'Actions' => array('actionPath' => 'controllers') | |
), | |
'authenticate' => array( | |
'Form' => array( | |
'userModel' => 'Pessoa', | |
'fields' => array('username' => 'cpf'), | |
'scope' => array('Pessoa.active' => ATIVO) | |
) | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment