PHPackages                             keboola/permission-checker - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. keboola/permission-checker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

keboola/permission-checker
==========================

Keboola K8S client library

3.0.0(2mo ago)021.0k↓26.7%2MITPHPPHP ^8.1

Since Jun 14Pushed 2mo ago8 watchersCompare

[ Source](https://github.com/keboola/permission-checker)[ Packagist](https://packagist.org/packages/keboola/permission-checker)[ RSS](/packages/keboola-permission-checker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (44)Used By (2)

Permission Checker
==================

[](#permission-checker)

Generic permissions checker that centralizes all permission checks in one place.

Usage
-----

[](#usage)

Library provides `Keboola\PermissionChecker\StorageApiTokenInterface` interface that is expected to be implemented by caller (or provided by some other compatible library). The token is then passed to `Keboola\PermissionChecker\PermissionChecker`along with concrete checker for the action to be validated.

If the check passes, script execution continues normally. If the check fails, `Keboola\PermissionChecker\Exception\PermissionException`is thrown with a message that describes the reason of the failure and is safe to be presented to a user.

```
use Keboola\PermissionChecker\PermissionChecker;
use Keboola\PersmissionChecker\Checker\JobQueue\CanRunJob;

$storageToken = new MyStorageApiClass(...)

$checker = new PermissionChecker();
$checker->checkPermissions($storageToken, new CanRunJob(BranchType::DEFAULT, 'keboola.component-id'));
```

Development
-----------

[](#development)

Prerequisites:

- installed `docker` to run &amp; develop the library

TL;DR:

```
docker compose run --rm dev-permission-checker composer install
docker compose run --rm dev-permission-checker composer ci

```

Implementing new checker
------------------------

[](#implementing-new-checker)

Each action that needs to be validated has its own checker - a class implementing `Keboola\PermissionChecker\Checker\PermissionCheckerInterface`. The interface has just a single method `checkPermission`which receives `Keboola\PersmissionChecker\StorageApiToken` instance (different class that the token passed to `Keboola\PermissionChecker\PermissionChecker::checkPermissions()`!) and throws `Keboola\PermissionChecker\Exception\PermissionException` if the check fails.

If the checker requires any additional data or depends on some other service, it is free to require it through its constructor.

License
-------

[](#license)

MIT licensed, see [LICENSE](./LICENSE) file.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance85

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~90 days

Total

22

Last Release

77d ago

Major Versions

0.2.0 → 1.0.02023-06-28

1.1.1 → 2.0.02023-07-17

2.10.0 → 3.0.02026-03-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (25 commits)")[![ErikZigo](https://avatars.githubusercontent.com/u/1726727?v=4)](https://github.com/ErikZigo "ErikZigo (21 commits)")[![odinuv](https://avatars.githubusercontent.com/u/4319320?v=4)](https://github.com/odinuv "odinuv (12 commits)")[![janvanicek](https://avatars.githubusercontent.com/u/26391551?v=4)](https://github.com/janvanicek "janvanicek (4 commits)")[![MiroCillik](https://avatars.githubusercontent.com/u/1488015?v=4)](https://github.com/MiroCillik "MiroCillik (2 commits)")[![devin-ai-integration[bot]](https://avatars.githubusercontent.com/in/811515?v=4)](https://github.com/devin-ai-integration[bot] "devin-ai-integration[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/keboola-permission-checker/health.svg)

```
[![Health](https://phpackages.com/badges/keboola-permission-checker/health.svg)](https://phpackages.com/packages/keboola-permission-checker)
```

PHPackages © 2026

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