PHPackages                             geniv/nette-authorizator - 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. geniv/nette-authorizator

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

geniv/nette-authorizator
========================

Authorizator extension for Nette Framework

v1.1.7(8y ago)0177MITPHPPHP &gt;=5.6.0

Since Aug 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/geniv/nette-authorizator)[ Packagist](https://packagist.org/packages/geniv/nette-authorizator)[ RSS](/packages/geniv-nette-authorizator/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (12)Used By (0)

ACL
===

[](#acl)

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

[](#installation)

```
$ composer require geniv/nette-authorizator
```

or

```
"geniv/nette-authorizator": ">=1.0.0"
```

require:

```
"php": ">=5.6.0",
"nette/nette": ">=2.4.0",
"dibi/dibi": ">=3.0.0"
```

Include in application
----------------------

[](#include-in-application)

### available source drivers:

[](#available-source-drivers)

- Neon (neon filesystem) - support **form**
- Dibi (dibi + cache) - support **form**
- Array (neon configure)

### policy:

[](#policy)

- `allow` - all is deny, allow part
- `deny` - all is allow, deny part
- `none` - all is allow, ignore part

neon configure:

```
# acl
authorizator:
#   autowired: false    # default null, true|false|self|null
    policy: allow       # allow (all is deny, allow part) | deny (all is allow, deny part) | none (all is allow, ignore part)
    source: "Neon"
    path: %appDir%/components/test/nette-authorizator/sql/acl.neon
#    source: "Dibi"
#    tablePrefix: %tablePrefix%
#    source: "Array"
#    role:
#        - guest
#        - moderator
#        - admin
#    resource:
#        - article
#        - comment
#        - poll
#    privilege:
#        - show
#        - insert
#        - update
#        - delete
#    acl:
#        moderator:
#            article: [show, insert, update]
#        admin: all
```

neon configure extension:

```
extensions:
    authorizator: Authorizator\Bridges\Nette\Extension
```

presenters:

```
$acl = $this->user->getAuthorizator();
$acl->isAllowed('guest', 'sekce-forum', 'zobrazit');

$this->user->isAllowed('sekce-forum', 'zobrazit');
```

usage:

```
...
```

**All method onSuccess callback are default defined like `$this->redirect('this');`**

presenters form:

```
use Authorizator\Forms\AclForm;
use Authorizator\Forms\PrivilegeForm;
use Authorizator\Forms\ResourceForm;
use Authorizator\Forms\RoleForm;
...
abstract class BasePresenter extends Presenter
{
    use AutowiredComponent;
...

protected function createComponentRoleForm(RoleForm $roleForm): RoleForm
{
    //$roleForm->setTemplatePath(path);
    //$roleForm->onSuccess[] = function (array $values) { };
    //$roleForm->onError[] = function (array $values, Exception $e = null) { };
    return $roleForm;
}

protected function createComponentResourceForm(ResourceForm $resourceForm): ResourceForm
{
    //$resourceForm->setTemplatePath(path);
    //$resourceForm->onSuccess[] = function (array $values) { };
    //$resourceForm->onError[] = function (array $values, Exception $e = null) { };
    return $resourceForm;
}

protected function createComponentPrivilegeForm(PrivilegeForm $privilegeForm): PrivilegeForm
{
    //$privilegeForm->setTemplatePath(path);
    //$privilegeForm->onSuccess[] = function (array $values) { };
    //$privilegeForm->onError[] = function (array $values, Exception $e = null) { };
    return $privilegeForm;
}

protected function createComponentAclForm(AclForm $aclForm): AclForm
{
    //$aclForm->setTemplatePath(path);
    //$aclForm->onSuccess[] = function (array $values) { };
    //$aclForm->onError[] = function (array $values) { };
    return $aclForm;
}
```

generic usage on security base presenter:

```
$acl = $this->user->getAuthorizator();
// manual set allowed with internal resolve policy
$acl->setAllowed(IAuthorizator::ALL, 'Homepage');
$acl->setAllowed(IAuthorizator::ALL, 'Login');

if (!$this->user->isAllowed($this->name, $this->action)) {
    // NOT ALLOWED
}
```

form not required for correct function ACL.

Available form: role, resource, privilege and acl.

usage **form**:

```
{control roleForm}
{control resourceForm}
{control privilegeForm}
{control aclForm}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~19 days

Recently: every ~6 days

Total

10

Last Release

3075d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6.0

v1.1.0PHP &gt;=7.0.0

### Community

Maintainers

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

---

Top Contributors

[![geniv](https://avatars.githubusercontent.com/u/563659?v=4)](https://github.com/geniv "geniv (50 commits)")

---

Tags

netteaclgenivauthorizator

### Embed Badge

![Health badge](/badges/geniv-nette-authorizator/health.svg)

```
[![Health](https://phpackages.com/badges/geniv-nette-authorizator/health.svg)](https://phpackages.com/packages/geniv-nette-authorizator)
```

###  Alternatives

[nette/security

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

3779.6M307](/packages/nette-security)

PHPackages © 2026

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