marcusamatos / jvs-acl
Zend\Acl module to Zend Framework 2
1.0.4
2014-06-02 23:40 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: >=4.1.0
This package is not auto-updated.
Last update: 2025-03-01 18:38:29 UTC
README
This module provide a simple acl controller for zf2.
This module can be used with Doctrin ORM.
This is very simple, only implement the JvsAcl\Entity\UserGroupProviderInterface
.
Requirements
Installation
- Add this project in your composer.json:
"required": { "marcusamatos/jvs-acl": "1.*" }
- Enabling ir in your
application.config.php
file.
return array( 'modules' => array( #[...] 'JvsAcl' #[...] ); );
-
Add
\JvsAcl\Entity\GroupProviderInterface
to your user entity -
Add in
module.config.php
return array( #[...] 'jvs-acl' => array( 'groups' => array( 'guest', 'member' => array('name' => 'Member', 'parent' => 'guest', 'visible' => true), 'admin' => array('name' => 'Administrator', 'parent' => 'member', 'visible' => true), 'developer' => array('name' => 'Developer', 'parent' => 'admin') ), 'controllers' => array( 'Application\Controller\Index' => array( 'guest' => 'allow' ), 'Application\Controller\Auth' => array( 'guest' => array( 'allow' => array('index', 'forgetPassword') ) ), 'Admin\Controller\Index' => array( 'admin' ), ) ) #[...] );