PHPackages                             kelunik/access-control - 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. kelunik/access-control

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

kelunik/access-control
======================

Role based access control.

29PHP

Since Apr 24Pushed 10y agoCompare

[ Source](https://github.com/kelunik/access-control)[ Packagist](https://packagist.org/packages/kelunik/access-control)[ RSS](/packages/kelunik-access-control/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

access-control
==============

[](#access-control)

[![Build Status](https://camo.githubusercontent.com/8cc715b3902b13f2ecce63c80d3b2cbb5d407f514d1141378eaf44183d180d10/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b656c756e696b2f6163636573732d636f6e74726f6c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/kelunik/access-control)[![CoverageStatus](https://camo.githubusercontent.com/b91d9505043be2df411cafd91c63598e1abb7b24ca74cdb5f0b87379bbded1f8/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6b656c756e696b2f6163636573732d636f6e74726f6c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/kelunik/access-control?branch=master)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)

`kelunik/access-control` is a role based access control system.

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

[](#requirements)

- PHP 7.0+

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

[](#installation)

```
composer require kelunik/access-control
```

Usage
-----

[](#usage)

```
$guest = new SimpleRole("guest", ["read"]);
$member = new CombinedRole("member", [$guest], ["read.internal"]);
$student = new CombinedRole("student", [$guest, $member], ["write.internal"]);
$staff = new CombinedRole("staff", [$guest, $member], ["write"]);

$accessControl = new AccessControl([
    $guest, $member, $student, $staff
]);

$isAllowed = $accessControl->isGranted(["member", "staff"], "write");
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

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/12852217f3369e8144bc9ce6ac2a2341c28c5512c5b3df5749bfbbd45b6877ff?d=identicon)[kelunik](/maintainers/kelunik)

---

Top Contributors

[![kelunik](https://avatars.githubusercontent.com/u/2743004?v=4)](https://github.com/kelunik "kelunik (2 commits)")

### Embed Badge

![Health badge](/badges/kelunik-access-control/health.svg)

```
[![Health](https://phpackages.com/badges/kelunik-access-control/health.svg)](https://phpackages.com/packages/kelunik-access-control)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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