PHPackages                             roshyo/rights-management-plugin - 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. roshyo/rights-management-plugin

ActiveSylius-plugin[Authentication &amp; Authorization](/categories/authentication)

roshyo/rights-management-plugin
===============================

A rights management plugin for Sylius.

1.1.3(5y ago)22331[1 PRs](https://github.com/Roshyo/SyliusRightsManagementPlugin/pulls)MITPHPPHP ^7.4

Since Jun 6Pushed 5y agoCompare

[ Source](https://github.com/Roshyo/SyliusRightsManagementPlugin)[ Packagist](https://packagist.org/packages/roshyo/rights-management-plugin)[ RSS](/packages/roshyo-rights-management-plugin/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (27)Versions (6)Used By (0)

Sylius Rights Management Plugin
===============================

[](#sylius-rights-management-plugin)

A rights management plugin for Sylius.

Installation
============

[](#installation)

1. Run

```
$ composer require behappy/rights-management-plugin
```

2. Enable the plugin in config/bundles.php:

```
public function registerBundles(): array
{
    $bundles = [
        // ...
        new \BeHappy\SyliusRightsManagementPlugin\BeHappySyliusRightsManagementPlugin()
    ];

    // ...
}
```

2. Add the following import to \_sylius.yaml:

```
imports:
    # ...
    - { resource: '@BeHappySyliusRightsManagementPlugin/Resources/config/app/config.yml' }
```

3. Add the following route to routes.yaml:

```
be_happy_rights_management:
    resource: '@BeHappySyliusRightsManagementPlugin/Resources/config/routing.yaml'
    prefix: /admin
```

4. Update your database schema:

```
$ php bin/console doctrine:schema:update --force
```

5. Override AdminUser template to add group select:
    1. Create a file: app/Resources/SyliusAdminBundle/views/AdminUser/\_form.html.twig
    2. In the freshly created file, put the content of [\_form.html.twig](https://github.com/Sylius/SyliusAdminBundle/blob/master/Resources/views/AdminUser/_form.html.twig)
    3. Then add the following snippet:

    ```

        {{ 'be_happy_rights_management.ui.group'|trans }}
        {{ form_widget(form.group) }}

    ```
6. Clear cache to load translation correctly

```
$ php bin/console cache:clear
```

Usage
=====

[](#usage)

Group can only grant or deny access to listed routes. To list route, add to your config.yml.

Example:

```
be_happy_sylius_rights_management:
    rights:
        product:
            all:
                name: 'be_happy_rights_management.rights.product.all'
                routes: ['sylius_admin_product_*']
                exclude: ['sylius_admin_product_review_*']
                redirect_to: sylius_admin_dashboard
                redirect_message: "be_happy_rights_management.message.access_denied"
        customer:
            list:
                name: 'be_happy_rights_management.rights.customer.list'
                routes: ['sylius_admin_customer_index']
                redirect_to: sylius_admin_dashboard
                redirect_message: "be_happy_rights_management.message.access_denied"
```

Architecture is:

```
be_happy_sylius_rights_management:
    rights:
        :
            :
                name: 'Feel free to set what you want. This string is translated by Symfony.'
                route: 'The name of the route in the routing.yml.'
                routes: 'An array of routes. This syntax is preferred to "route"'
                exclude: 'An array of excluded routes (useful if you define routes with a *).'
                redirect_to: 'The route to redirect if not granted.'
                redirect_message: 'A message if not granted.'
```

Family and Action can be set to what you want, they are only used to get a nice and beautiful architecture.

The syntax with an "\*" is allowed, making the firewall to take everything starting by the given string. The "\*" is only allowed at the end of a string.

Caution
=======

[](#caution)

We advice you to create an Admin Group with full right, otherwise when you will edit an user, it will take the first group in the list. And you will need to unlock the user directly in MySQL. You manually need to update and save groups if new routes are added in config.yml.

Feel free to contribute
=======================

[](#feel-free-to-contribute)

You can also ask your questions at the mail address in the composer.json mentioning this package.

Other
=====

[](#other)

You can also check our other packages (including Sylius plugins) at

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% 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 ~241 days

Total

5

Last Release

1928d ago

PHP version history (2 changes)1.0.0PHP ^7.1

1.1.3PHP ^7.4

### Community

Maintainers

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

---

Top Contributors

[![Roshyo](https://avatars.githubusercontent.com/u/9363039?v=4)](https://github.com/Roshyo "Roshyo (18 commits)")[![SteadEXE](https://avatars.githubusercontent.com/u/1759156?v=4)](https://github.com/SteadEXE "SteadEXE (6 commits)")[![aa-ahmed-aa](https://avatars.githubusercontent.com/u/9592546?v=4)](https://github.com/aa-ahmed-aa "aa-ahmed-aa (3 commits)")[![pogorivan](https://avatars.githubusercontent.com/u/16318640?v=4)](https://github.com/pogorivan "pogorivan (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/roshyo-rights-management-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/roshyo-rights-management-plugin/health.svg)](https://phpackages.com/packages/roshyo-rights-management-plugin)
```

###  Alternatives

[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[sulu/skeleton

Project template for starting your new project based on the Sulu content management system

29733.3k](/packages/sulu-skeleton)[ibexa/oss

A meta package for installing Ibexa Open Source

19772.4k9](/packages/ibexa-oss)[pumukit/pumukit

Media Portal

5714.0k36](/packages/pumukit-pumukit)

PHPackages © 2026

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