Skip to content

Instantly share code, notes, and snippets.

@fabiopaiva
Created December 5, 2014 22:02
Show Gist options
  • Save fabiopaiva/6ce99d7f2e455fb81ae7 to your computer and use it in GitHub Desktop.
Save fabiopaiva/6ce99d7f2e455fb81ae7 to your computer and use it in GitHub Desktop.
My Bjyauthorize configuration
<?php
return array(
'bjyauthorize' => array(
'default_role' => 'Visitante',
// Using the authentication identity provider, which basically reads the roles from the auth service's identity
'identity_provider' => 'BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider',
'role_providers' => array(
// using an object repository (entity repository) to load all roles into our ACL
'BjyAuthorize\Provider\Role\ObjectRepositoryProvider' => array(
'object_manager' => 'doctrine.entitymanager.orm_default',
'role_entity_class' => 'ZfcUserCrud\Entity\Role',
),
),
'guards' => array(
'BjyAuthorize\Guard\Controller' => array(
array(
'controller' => 'zfcuser',
'action' => array('index', 'logout'),
'roles' => array('Usuário')
),
array(
'controller' => 'Application\Controller\Index',
'roles' => array('Administrador')
),
//Gerenciar usuários e categorias de usuários
array(
'controller' => 'ZfcUserCrud\Controller\Crud',
'roles' => array('Administrador')
),
array(
'controller' => 'ZfcUserCrud\Controller\Role',
'roles' => array('Administrador')
),
//Alterar a senha
array(
'controller' => 'ZfcUserCrud\Controller\Crud',
'action' => array('password'),
'roles' => array('Usuário')
),
),
)
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment