Skip to content

gontero/gontero-acl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Annotation ACL plugin for Zend Framework 2

This plugin is create for manage ACL with zend annotations engine. It looks like this:

use GonterAcl\Annotation\Role;

class IndexController extends AbstractActionController
{

  /**
   * here u can pass roles in annotations wich users can use this action.
   * @Role(roles={"guest","user","admin"})
   */
  public function indexAction()
  {
    return;
  }
}

Requirements

PHP >= 5.5.0

Installation

Require via composer

composer require gontero/gontero-acl

Enable it in application.config.php

return array(
  'modules' => array(
      // other modules
      'GonteroAcl'
  ),
  // other content
);

Configuration:

return array(
    'gontero-acl' => array(
        // if you use Auth adapter inside this module u can use bCrypt cost
        'bCryptCost' => 4,
        // if you use Doctrine its name of user entity
        'userEntity' => '',
    )
);

About

ACL make on annotations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages