PHPackages                             misaf/vendra-permission - 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. misaf/vendra-permission

ActiveVendra-module[Authentication &amp; Authorization](/categories/authentication)

misaf/vendra-permission
=======================

Role and permission management for Vendra, built on top of Spatie Permission

v1.10.0(2w ago)1244MITPHPPHP ^8.3CI failing

Since Jul 10Pushed 2w agoCompare

[ Source](https://github.com/misaf/vendra-permission)[ Packagist](https://packagist.org/packages/misaf/vendra-permission)[ Docs](https://github.com/misaf/vendra-permission)[ RSS](/packages/misaf-vendra-permission/feed)WikiDiscussions 1.x Synced 1w ago

READMEChangelog (10)Dependencies (22)Versions (26)Used By (4)

Vendra Permission
=================

[](#vendra-permission)

Role and permission management for Vendra applications.

Features
--------

[](#features)

- Role and permission resources in the shared `Customers` cluster
- Role and permission CRUD resources
- Manage role-permission relations from role pages
- Tenant-scoped Pennant feature flags for module/resource access
- Feature toggle Artisan command per tenant
- Policy classes and enums for role/permission actions
- Translation files for `en`, `de`, and `fa`
- Configurable `Gate::after()` admin bypass role

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

[](#requirements)

- PHP 8.3+
- Laravel 13
- Filament 5
- Livewire 4
- Pest 4
- Tailwind CSS 4
- `laravel/pennant`
- `misaf/vendra-support`
- `misaf/vendra-user`
- `awcodes/filament-badgeable-column`
- `misaf/filament-jalali`
- `spatie/laravel-permission`

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

[](#installation)

```
composer require misaf/vendra-permission
```

Publish Spatie Permission's configuration if it is not already present, then publish Vendra's tenant-aware permission migration:

```
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag=permission-config
php artisan vendor:publish --tag=vendra-permission-migrations
php artisan migrate
```

Optional: publish module translations:

```
php artisan vendor:publish --tag=vendra-permission-translations
```

Optional: publish module config:

```
php artisan vendor:publish --tag=vendra-permission-config
```

If you use Pennant with the database driver, ensure Pennant storage is migrated in your application.

Configuration
-------------

[](#configuration)

If you want Spatie to use this module's models everywhere in your app, set `config/permission.php`:

```
'models' => [
    'permission' => Misaf\VendraPermission\Models\Permission::class,
    'role' => Misaf\VendraPermission\Models\Role::class,
],
```

The admin bypass role is configurable in `config/vendra-permission.php`:

```
'admin_role' => env('VENDRA_PERMISSION_ADMIN_ROLE', RoleEnum::Admin->value),
```

The config key is `admin_role` (short and local to this file). The env var is `VENDRA_PERMISSION_ADMIN_ROLE` (prefixed to avoid global collisions). It defaults to `RoleEnum::Admin` — the top-level role granted to a tenant owner; admins may create additional scoped roles themselves. This value is used for both the `Gate::after()` admin bypass and excluding that role from the roles table query.

Pennant feature behavior is configured in `config/vendra-permission.php`:

```
'features' => [
    'enabled' => env('VENDRA_PERMISSION_FEATURES_ENABLED', false),
    'defaults' => [
        'vendra-permission.module-enabled' => false,
        'vendra-permission.role-management' => false,
        'vendra-permission.permission-management' => false,
        'vendra-permission.bulk-role-assignment' => false,
    ],
],
```

Filament
--------

[](#filament)

Resources are registered on the `admin` panel through `PermissionPlugin`:

- Roles
- Permissions

Both resources live in the shared `Customers` cluster.

Access is feature-gated against the current scope returned by the shared `TenantResolver`:

- `vendra-permission.module-enabled` controls both resources
- `vendra-permission.role-management` controls role resource access
- `vendra-permission.permission-management` controls permission resource access
- `vendra-permission.bulk-role-assignment` controls attach/detach role bulk actions

Pennant Features
----------------

[](#pennant-features)

Feature resolution must be enabled. Tenant-aware applications reject non-tenant scopes; unresolved feature values use `features.defaults`.

Feature map:

Enum caseFeature keyShort keyEffect`ModuleEnabled``vendra-permission.module-enabled``module-enabled`Enables or hides both permission resources`RoleManagement``vendra-permission.role-management``role-management`Enables or hides the roles resource`PermissionManagement``vendra-permission.permission-management``permission-management`Enables or hides the permissions resource`BulkRoleAssignment``vendra-permission.bulk-role-assignment``bulk-role-assignment`Enables or hides attach/detach role bulk actionsArtisan Commands
----------------

[](#artisan-commands)

Toggle tenant features with:

```
php artisan vendra-permission:feature {activate|deactivate} {feature|all} {tenant}
```

`feature` accepts:

- enum case name, e.g. `RoleManagement`
- full key, e.g. `vendra-permission.role-management`
- short key, e.g. `role-management`
- `all`

`tenant` accepts:

- tenant `id`
- tenant `slug`

The command requires `vendra-permission.features.enabled` to be `true`.

Examples:

```
php artisan vendra-permission:feature activate module-enabled 1
php artisan vendra-permission:feature activate permission-management acme
php artisan vendra-permission:feature deactivate all acme
```

Seed permissions and demo data for a tenant with:

```
php artisan vendra-permission:seed {tenant}
```

Usage
-----

[](#usage)

Use this package's tenant feature flags and console command to control access in each tenant:

- `vendra-permission.module-enabled`
- `vendra-permission.role-management`
- `vendra-permission.permission-management`
- `vendra-permission.bulk-role-assignment`

Role/permission CRUD and assignment semantics follow Spatie Permission. See:

Testing
-------

[](#testing)

Run the package checks from the package directory:

```
composer test
composer analyse
composer format
```

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance96

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

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

Total

23

Last Release

17d ago

Major Versions

0.2.0 → v1.0.02026-07-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/41fd7351d25e29dafa18068d0418eecf6bb47a7473aabe6bc674b4ca35e71805?d=identicon)[misaf](/maintainers/misaf)

---

Top Contributors

[![misaf](https://avatars.githubusercontent.com/u/8195685?v=4)](https://github.com/misaf "misaf (99 commits)")

---

Tags

laravelpermissionfilamentphpmisafvendra

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/misaf-vendra-permission/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

13.0k107.5M1.6k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k4.3M161](/packages/bezhansalleh-filament-shield)[waguilar33/filament-guardian

Role and permission management for Filament

175.2k](/packages/waguilar33-filament-guardian)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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