PHPackages                             spalax/zf2-simple-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. spalax/zf2-simple-acl

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

spalax/zf2-simple-acl
=====================

Simple acl module. Provide possibilities to restrict ROUTES. Provide smart redirection according on path/module where user requested restricted resource. It is can be used for restricting few modules with on ACL library.

0.0.2(12y ago)0101MITPHPPHP &gt;=5.3

Since Nov 13Pushed 12y ago1 watchersCompare

[ Source](https://github.com/spalax/zf2-simple-acl)[ Packagist](https://packagist.org/packages/spalax/zf2-simple-acl)[ RSS](/packages/spalax-zf2-simple-acl/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

ZF2 Simple Acl
==============

[](#zf2-simple-acl)

Simple acl module.

Restrict ROUTES
---------------

[](#restrict-routes)

Only one thing you need to start is to define routes which you want to restrict and the strategy which you would like to use for other not defined routes. Strategy might be '**permissive**' or '**strict**'. If value '**permissive**' it will mean "allow all from all" so then you will have to restrict all resources which you want to be restricted. If value '**strict**' it is will mean "deny all from all" so then you will have to allow every resource which you want to be available

```
'restriction_strategy' => 'permissive',

'routes' => array(
  'main' => array(true)
)

```

Smart redirection
-----------------

[](#smart-redirection)

Provide smart redirection according on path/module where user requested restricted resource. It is can be used for restricting few modules with on ACL library.

```
'redirect_route' => array('/frontend.*?/'=>'frontend/user/login',
                          '/backend.*?/'=>'backend/user/login')

```

It is very usefull if you have authorization on your frontend and backend modules, and you would like to redirect user who requested backend resource to the backend/user/login route and users who requested frontend restricted resource to the frontend/user/login.

Recognizers
-----------

[](#recognizers)

It is very simple ability to authorize user by some token. Now supports authorization only thru token defined in COOKIE. I've added this feature only because from time to time i need user role which can acces to the special resources but without real authorization thru login form. In my example it was a cron script.

```
wget http://$1/generate/sitemap --no-cookies --header "Cookie: cron=a23b4cdg76fb38a5d48b83e22f0e79df" -o /dev/null -O /tmp/sitemap.generated

```

you should specify recognizer:

```
'recognizers' => array('cron'),

```

and role :

```
  'roles' => array(array('name'=>'cron',
                         'id'=>2,
                         'data' => array(
                             'type'=>'cron',
                             // It is authorization token, value will be compared with
                             // token inside $_COOKIE['cron'] and will decide that this is
                             // cron role.
                             'token'=>'a23b4cdg76fb38a5d48b83e22f0e79df'
  )))

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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.

###  Release Activity

Cadence

Every ~20 days

Total

2

Last Release

4534d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0b1423a6a0ecde783501381af6302d541e33cb8b6806bfc671fc29171d32aa1?d=identicon)[Spalax](/maintainers/Spalax)

---

Top Contributors

[![spalax](https://avatars.githubusercontent.com/u/1273733?v=4)](https://github.com/spalax "spalax (54 commits)")

---

Tags

acl

### Embed Badge

![Health badge](/badges/spalax-zf2-simple-acl/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[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)[casbin/casbin

a powerful and efficient open-source access control library for php projects.

1.3k1.4M54](/packages/casbin-casbin)[nette/security

🔑 Nette Security: provides authentication, authorization and a role-based access control management via ACL (Access Control List)

3839.3M279](/packages/nette-security)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)

PHPackages © 2026

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