PHPackages                             ripaclub/aclman - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ripaclub/aclman

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ripaclub/aclman
===============

A library designed to manage ACL

v0.3.0(9y ago)22241[1 PRs](https://github.com/ripaclub/aclman/pulls)BSD-2-ClausePHPPHP &gt;=5.4.0

Since Oct 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ripaclub/aclman)[ Packagist](https://packagist.org/packages/ripaclub/aclman)[ Docs](http://github.com/ripaclub/aclman)[ RSS](/packages/ripaclub-aclman/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (7)Used By (0)

ACL manager
===========

[](#acl-manager)

[![Latest Stable Version](https://camo.githubusercontent.com/d0786c3995dc74c6d45aa52cf430d4cdfe38e00e6b18b6988feb09d82b434882/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72697061636c75622f61636c6d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ripaclub/aclman) [![Build Status](https://camo.githubusercontent.com/5f198da93648581943173f8d8c938cc2a059e41c85e3ddba2f3e353ecf316a0b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72697061636c75622f61636c6d616e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ripaclub/aclman) [![Coverage Status](https://camo.githubusercontent.com/20a2562ca4c2e41a1e0ea2b346c0b209eb5f044e9094703d86343a88498d5391/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f72697061636c75622f61636c6d616e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/ripaclub/aclman)

> AclMan is a PHP library designed to manage access control list (ACL).

Requisites
----------

[](#requisites)

- PHP &gt;= 5.4
- Composer

Features
--------

[](#features)

AclMan has various features:

- Assertions

    It provides an `AssertionPluginManager` whose goal is to deliver the assertions (i.e., `AssertionInterface` objects)
- Permissions

    Contains a class, `GenericPermission`, that is a container of permission options (e.g., a role, a resource, a privilege, an assertion)
- Resources and roles

    It provides a set of traits aimed to check the validity of resources and roles and instantiate their relative classes
- Storages

    AclMan allows you to save the ACL configuration in several layers persistence, via `StorageInterface` objects and adapters (e.g., `ArrayAdapter`)
- Services

    A set of classes aimed at the instantiation of ACL objects

Installation
------------

[](#installation)

Add `ripaclub/aclman` to your `composer.json`.

```
{
   "require": {
       "ripaclub/aclman": "~0.2.0"
   }
}

```

Configuration
-------------

[](#configuration)

AclMan library has only two configuration nodes:

1. `aclman_storage` to configure the persistence layer in which to save your ACL rules
2. `aclman_services` to configure your services (e.g., a storage and optionally a plugin manager)

Usage (1)
---------

[](#usage-1)

So, here is an example of use. You first need to configure the factories.

Put this PHP array into your configuration file.

```
'abstract_factories' => [
    'AclMan\Service\ServiceFactory',
    'AclMan\Storage\StorageFactory'
],
'factories' => [
    'AclMan\Assertion\AssertionManager' => 'AclMan\Assertion\AssertionManagerFactory'
]
```

Then we configure our service.

```
'aclman_services' => [
    'AclService\Ex1' => [
        'storage' => 'AclStorage\Ex1',
        'plugin_manager' => 'AclMan\Assertion\AssertionManager',
    ],
]
'aclman-assertion-manager' => [
    'invokables' => [
        'assertAlias' => 'assertionClass',
        ...
        ...
    ]
]
```

Finally, our storage configuration.

```
'aclman_storage' => [
    'AclStorage\Ex1' => [
        'roles' => [
             // Config specific permission for role Role1 to resources Resource1 and Resource2
            'Role1' => [
                'resources' => [
                    'Resource1' => [
                        [
                            'assert' => null,
                            'allow' => true,
                            'privilege' => 'add'
                        ]
                    ],
                    'Resource2' => [
                        [
                            'assert' => [
                                'assertAlias' => [
                                    'config' => 'test'
                                ],
                            ],
                            'allow' => true,
                            'privilege' => 'view'
                        ]
                    ]
                ],
            ],
            // Config specific permission for all roles to resource Resource1 (e.x public resource)
            StorageInterface::ALL_ROLES => [
                'resources' => [
                    'Resource3' => [
                        [
                            'allow' => true,
                        ]
                    ],
                ]
            ],
            // Config specific permission for Admin to all resource (e.x access to al resource to the admin)
            'Admin' => [
                'resources' => [
                    StorageInterface::ALL_RESOURCES  => [
                        [
                            'allow' => true,
                        ]
                    ],
                ]
            ],
        ],
    ],
]
```

Our first ACL configuration is now complete. Use it:

```
$aclService1 = $serviceLocator->get('AclService\Ex1');
$aclService1->isAllowed('Role1', 'Resource1', 'view'); // FALSE
$aclService1->isAllowed('Role1', 'Resource1', 'add'); // TRUE
// ...
```

Notice the behaviour ...

```
$aclService1 = $serviceLocator->get('AclService\Ex1');
$aclService1->isAllowed('Role1', 'Resource1', 'add'); // TRUE
$aclService1->isAllowed('Role1', 'Resource2', 'view'); // FALSE
// ...
```

---

[![Analytics](https://camo.githubusercontent.com/52dcfb36453cb8ffe352c02b3bf7be2bc2228b51541c798529b9a1afae42b081/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d34393635373137362d332f61636c6d616e)](https://github.com/igrigorik/ga-beacon)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~274 days

Total

4

Last Release

3396d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120051?v=4)[Leo Di Donato](/maintainers/leodido)[@leodido](https://github.com/leodido)

![](https://avatars.githubusercontent.com/u/3390997?v=4)[Leonardo Grasso](/maintainers/leogr)[@leogr](https://github.com/leogr)

![](https://avatars.githubusercontent.com/u/3627018?v=4)[visa4](/maintainers/visa4)[@visa4](https://github.com/visa4)

---

Top Contributors

[![leodido](https://avatars.githubusercontent.com/u/120051?v=4)](https://github.com/leodido "leodido (25 commits)")[![visa4](https://avatars.githubusercontent.com/u/3627018?v=4)](https://github.com/visa4 "visa4 (20 commits)")[![leogr](https://avatars.githubusercontent.com/u/3390997?v=4)](https://github.com/leogr "leogr (4 commits)")

---

Tags

storageaclrolesresourcesprivilegesaccess control listacl manager

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ripaclub-aclman/health.svg)

```
[![Health](https://phpackages.com/badges/ripaclub-aclman/health.svg)](https://phpackages.com/packages/ripaclub-aclman)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[zizaco/entrust

This package provides a flexible way to add Role-based Permissions to Laravel. Supports laravel 5|6|7|8

6.0k5.3M61](/packages/zizaco-entrust)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeremykenedy/laravel-roles

A Powerful package for handling roles and permissions in Laravel. Supports Laravel 5.3 up to 12.

1.0k826.8k7](/packages/jeremykenedy-laravel-roles)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
