PHPackages                             behappy/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. behappy/rights-management-plugin

ActiveSylius-plugin[Utility &amp; Helpers](/categories/utility)

behappy/rights-management-plugin
================================

A rights management plugin for Sylius.

1.1.2(7y ago)51.8k↓100%10MITPHPPHP ^7.1

Since Jun 6Pushed 5y ago7 watchersCompare

[ Source](https://github.com/BeHappyCommunication/SyliusRightsManagementPlugin)[ Packagist](https://packagist.org/packages/behappy/rights-management-plugin)[ RSS](/packages/behappy-rights-management-plugin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (20)Versions (5)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 app/AppKernel.php:

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

    // ...
}
```

2. Add the following import to config.yml:

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

3. Add the following route to routing.yml:

```
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) }}

    ```

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

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 68.2% 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 ~41 days

Total

4

Last Release

2774d ago

### 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 (15 commits)")[![SteadEXE](https://avatars.githubusercontent.com/u/1759156?v=4)](https://github.com/SteadEXE "SteadEXE (6 commits)")[![pogorivan](https://avatars.githubusercontent.com/u/16318640?v=4)](https://github.com/pogorivan "pogorivan (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[webgriffe/sylius-table-rate-shipping-plugin

Provides table rate shipping calculator.

1490.4k](/packages/webgriffe-sylius-table-rate-shipping-plugin)

PHPackages © 2026

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