PHPackages                             drago-ex/authorization - 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. drago-ex/authorization

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

drago-ex/authorization
======================

A simple dynamic access control list (ACL) management system for Nette Framework, with support for roles, permissions, and resources

v1.0.28(2y ago)01.2kMITPHPPHP &gt;=8.1 &lt;8.4CI passing

Since Nov 30Pushed 1w ago1 watchersCompare

[ Source](https://github.com/drago-ex/authorization)[ Packagist](https://packagist.org/packages/drago-ex/authorization)[ RSS](/packages/drago-ex-authorization/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (10)Dependencies (13)Versions (23)Used By (0)

Drago Authorization
===================

[](#drago-authorization)

Drago Authorization is a simple and dynamic access control list (ACL) management system built on top of the Nette Framework. It provides an easy-to-use solution for managing roles, resources, and permissions, with built-in support for PHP 8.3 or higher.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://github.com/drago-ex/authorization/blob/master/license)[![PHP version](https://camo.githubusercontent.com/829f2d793f35144961eae76f31c177662e513e7c75c5582a54a6fd4ac9a8cea4/68747470733a2f2f62616467652e667572792e696f2f70682f647261676f2d6578253246617574686f72697a6174696f6e2e737667)](https://badge.fury.io/ph/drago-ex%2Fauthorization)[![Tests](https://github.com/drago-ex/authorization/actions/workflows/tests.yml/badge.svg)](https://github.com/drago-ex/authorization/actions/workflows/tests.yml)[![Coding Style](https://github.com/drago-ex/authorization/actions/workflows/coding-style.yml/badge.svg)](https://github.com/drago-ex/authorization/actions/workflows/coding-style.yml)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Nette Framework
- Composer
- Bootstrap

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

[](#installation)

```
composer require drago-ex/authorization

```

Extension Registration
----------------------

[](#extension-registration)

To use Drago Authorization in your Nette application, register the extension in your `config.neon` file:

```
extensions:
	- Drago\Authorization\DI\AuthorizationExtension
```

Examples
--------

[](#examples)

Use Trait in Base Presenter for Access Control
----------------------------------------------

[](#use-trait-in-base-presenter-for-access-control)

You can use the `Authorization` trait in your base presenter to manage access control and redirect users to the login page if needed.

```
use Drago\Authorization\Authorization

// Redirect to a specific login presenter or module
private string $loginLink = ':Module:Presenter:';
```

Use Trait in Presenter for Access Control Settings
--------------------------------------------------

[](#use-trait-in-presenter-for-access-control-settings)

In each presenter, use the `AuthorizationControl` trait to manage authorization control.

```
use Drago\Authorization\Control\AuthorizationControl
```

Component Creation and Configuration
------------------------------------

[](#component-creation-and-configuration)

Here's how to create and configure the main components for managing roles, permissions, and resources:

```
// Minimum configuration to create components.

protected function createComponentPermissionsControl(): PermissionsControl
{
	return $this->permissionsControl;
}

protected function createComponentRolesControl(): RolesControl
{
	return $this->rolesControl;
}

protected function createComponentResourcesControl(): ResourcesControl
{
	return $this->resourcesControl;
}

protected function createComponentPrivilegesControl(): PrivilegesControl
{
	return $this->privilegesControl;
}

protected function createComponentAccessControl(): AccessControl
{
	return $this->accessControl;
}
```

You can also configure custom templates for the components:

```
// Set custom templates for controls
$control->templateControl = __DIR__ . '/path/to/file.latte';
$control->templateGrid = __DIR__ . '/path/to/file.latte';

// Insert a translator for multi-language support
$control->translator = $this->getTranslator();
```

Use Components in Latte
-----------------------

[](#use-components-in-latte)

Once the components are configured, you can render them in your Latte templates:

```
{control permissionsControl}
{control rolesControl}
{control resourcesControl}
{control privilegesControl}
{control accessControl}
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance64

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity77

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

Total

19

Last Release

856d ago

PHP version history (3 changes)v1.0.0PHP &gt;=8.0

v1.0.21PHP &gt;=8.1

v1.0.28PHP &gt;=8.1 &lt;8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5998929?v=4)[Zdeněk Papučík](/maintainers/accgit)[@accgit](https://github.com/accgit)

---

Top Contributors

[![accgit](https://avatars.githubusercontent.com/u/5998929?v=4)](https://github.com/accgit "accgit (548 commits)")

---

Tags

aclnette

### Embed Badge

![Health badge](/badges/drago-ex-authorization/health.svg)

```
[![Health](https://phpackages.com/badges/drago-ex-authorization/health.svg)](https://phpackages.com/packages/drago-ex-authorization)
```

PHPackages © 2026

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