Created
May 9, 2013 20:24
-
-
Save hewerthomn/5550299 to your computer and use it in GitHub Desktop.
exemplo de arquivo app/Config/acl.php
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
/** | |
* The role map defines how to resolve the user record from your application | |
* to the roles you defined in the roles configuration. | |
*/ | |
$config['map'] = array( | |
'Pessoa' => 'Pessoa/cpf', // username login field | |
'Perfil' => 'Pessoa/perfil_id', // user role field | |
); | |
/** | |
* define aliases to map your model information to | |
* the roles defined in your role configuration. | |
*/ | |
$config['alias'] = array( | |
'Perfil/1' => 'Perfil/admin', | |
'Perfil/2' => 'Perfil/usuario' | |
); | |
/** | |
* role configuration | |
*/ | |
$config['roles'] = array( | |
'Perfil/admin' => 'Perfil/usuario' | |
); | |
/** | |
* rule configuration | |
*/ | |
$config['rules'] = array( | |
'allow' => array( | |
/** | |
* Permissões para Perfil de Desenvolvedor | |
*/ | |
'*' => 'Perfil/dev', | |
/** | |
* Permissões para Perfil de Administrador | |
*/ | |
'controllers/Solicitacoes/admin' => 'Perfil/admin', | |
'controllers/Pessoas/(index|add|edit|delete|excluidos)' => 'Perfil/admin' | |
/** | |
* Permissões para Perfil de Usuário Comum | |
*/ | |
'controllers/Pessoas/(inicio|perfil|entrar|sair|alterar_senha)' => 'Perfil/usuario', | |
'controllers/(Pessoas|Motoristas|Veiculos)/procurar' => 'Perfil/usuario' | |
), | |
'deny' => array( | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment