ACL library

About

This is a module to vegas-cmf-core which provides ACL builder & checks for an application.
Library provides adapters based on Mongo & MySQL. Current implementation assumes use of only one at once.

Basic concepts

Role

This is meant as user account type. Current ACL implementation allows multiple roles to be linked to one user account.

Resource

Mapped to a controller inside a module.

/**
 * @ACL(name="mvc:text:Frontend\Example", description="Example controller")
 */
class ExampleController extends \Vegas\Mvc\Controller\ControllerAbstract
{
    // ...
}

Resource Access

Specifies type of access to a resource. Mapped to an action inside a controller. In your controller, specify following annotation before action code:

/**
 * @ACL(name="index", description="Index action")
 */
public function indexAction()
{
    // ...
}

Access Control List

Combines all above parts. For example, role Editor can enter index action inside mvc:text:Frontend\Example resource as long as is has a record inside the ACL.