PHPackages                             cawaphp/acl - 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. cawaphp/acl

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

cawaphp/acl
===========

Сáша Acl

0193PHP

Since Feb 19Pushed 8y agoCompare

[ Source](https://github.com/cawaphp/acl)[ Packagist](https://packagist.org/packages/cawaphp/acl)[ RSS](/packages/cawaphp-acl/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Сáша Acl
========

[](#сáша-acl)

Simple ACL with permission &amp; filters
----------------------------------------

[](#simple-acl-with-permission--filters)

Warning
-------

[](#warning)

Be aware that this package is still in heavy developpement. Some breaking change will occure. Thank's for your comprehension.

Features
--------

[](#features)

- Recursive permission with simple format : key1/key2/key3
- Can have filter on permission ion order to limit some permissions depending on context
- Merge permissions for multiple role with `addPermissions`
- Simple php array that can be serializes to database for persistent storage

Basic Usage
-----------

[](#basic-usage)

```
class Role
{
    use PermissionTrait;

    public function __construct()
    {
        $this->addPermissions([
            new Permission('app', [
                new Filter('app', [1]),
                new Permission('user', [
                    new Permission('group', [
                        new Permission('read'),
                        new Permission('create'),
                        new Permission('update'),
                        new Permission('delete'),
                    ]),
                ])
            ])
        ]);

        $this->addPermissions([
            new Permission('app', [
                new Filter('app', [2]),
                new Permission('user', [
                    new Permission('role', [
                        new Permission('read'),
                    ])
                ])
            ])
        ]);
    }
}

$role = new Role();

// Permissions
var_dump($role->isAllowed('app/user/group/read'); // true
var_dump($role->isAllowed('app/user/role/read'); // true
var_dump($role->isAllowed('app/user/role/create'); // false
var_dump($role->isAllowed('app/user/*'); // true
var_dump($role->isAllowed('app/user/permision/*'); // false

// Filters
var_dump($role->isAllowed('app', ['app' => 1])); // true
var_dump($role->isAllowed('app/user/role/read', ['app' => 1])); // true (filter are inherited)
var_dump($role->isAllowed('app/user/role/read', ['app' => 2])); // false
var_dump($role->isAllowed('app/user/role/read', ['unknown' => 1])); // true (no filter found mean all available)
```

About
-----

[](#about)

### License

[](#license)

Cawa is licensed under the GPL v3 License - see the `LICENSE` file for details

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e49ec71b223035cadd3123f997666dd685f1b3eb355b894a35bd8adeb4da3ba4?d=identicon)[tchiot.ludo](/maintainers/tchiot.ludo)

---

Top Contributors

[![tchiotludo](https://avatars.githubusercontent.com/u/2064609?v=4)](https://github.com/tchiotludo "tchiotludo (9 commits)")

### Embed Badge

![Health badge](/badges/cawaphp-acl/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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