odiseoteam / sylius-rbac-plugin
Sylius roles and permissions management plugin
Package info
github.com/odiseoteam/SyliusRbacPlugin
Type:sylius-plugin
pkg:composer/odiseoteam/sylius-rbac-plugin
Requires
- php: ^8.2
- sylius/sylius: ^2.0
- symfony/yaml: ^6.4 || ^7.0
Requires (Dev)
- behat/behat: ^3.16
- dbrekelmans/bdi: ^1.4
- deptrac/deptrac: ^3.0
- dmore/behat-chrome-extension: ^1.4
- dmore/chrome-mink-driver: ^2.9
- friends-of-behat/mink: ^1.11
- friends-of-behat/mink-browserkit-driver: ^1.6
- friends-of-behat/mink-debug-extension: ^2.1
- friends-of-behat/mink-extension: ^2.7
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.1
- friends-of-behat/symfony-extension: ^2.6
- friends-of-behat/variadic-extension: ^1.6
- nyholm/psr7: ^1.8
- phpstan/phpstan: ^1.12
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10.5
- robertfausk/behat-panther-extension: ^2.0
- shipmonk/composer-dependency-analyser: ^1.8
- sylius-labs/coding-standard: ^4.4
- sylius-labs/suite-tags-extension: ~0.2
- sylius/sylius-rector: ^2.0
- sylius/test-application: ^2.0.0@alpha
- symfony/browser-kit: ^6.4 || ^7.4
- symfony/debug-bundle: ^6.4 || ^7.4
- symfony/dotenv: ^6.4 || ^7.4
- symfony/http-client: ^6.4 || ^7.4
- symfony/intl: ^6.4 || ^7.4
- symfony/runtime: ^6.4 || ^7.4
- symfony/web-profiler-bundle: ^6.4 || ^7.4
- symfony/webpack-encore-bundle: ^2.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master / 3.0.x-dev
- v3.0.2
- v3.0.1
- v3.0.0
- v3.0.0-beta1
- v3.0.0-alpha4
- v3.0.0-alpha3
- v3.0.0-alpha2
- v3.0.0-alpha1
- 2.0.x-dev
- v2.0.1
- v2.0.0
- 1.6.x-dev
- v1.6.2
- v1.6.1
- v1.6.0
- 1.5.x-dev
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- 1.4.x-dev
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- 1.3.x-dev
- v1.3.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.3.0
- v0.2.1
- v0.2.0
- v0.1.0
- dev-fix/admin-user-roles-section
- dev-fix/postgresql-migrations
- dev-documentation
- dev-plugin-revamp
This package is auto-updated.
Last update: 2026-09-12 05:34:45 UTC
README
Sylius RBAC Plugin
This plugin adds role-based access control to the Sylius admin: you define your own roles, one permission per operation on one resource, and it enforces them everywhere.
What you get
- One permission per operation:
sylius.product.updateandsylius.product.deleteare separate permissions. Wildcards keep it manageable:sylius.product.*,*.*.index,*.*.*. - Every admin route covered: Permissions are discovered from Sylius' own resource metadata, so routes added by Sylius or by other plugins are covered automatically.
- Admin API coverage: This plugin covers all the APIs operations.
- Deny by default: An unprotected route is denied, not allowed. Exceptions are explicit, in config.
- UI filtered, not just routes: Menu entries, grid buttons and dashboard widgets check the same permission, so what a role can't use isn't rendered.
- Workflow transitions have their own permission: Cancelling an order asks for
sylius.order.cancel, notsylius.order.update. - Multiple roles per administrator: Roles are additive, with a lockout guard on the roles screen.
- Console tooling: Grant access from the CLI, list permissions, find orphaned ones, migrate v2 data.
- 18 locales: Including English, Spanish, French, German, Polish, Portuguese, Simplified Chinese and Arabic.
Screenshots
Roles: The ones you define, not a fixed list |
Assignment: An administrator may hold several roles |
Menu: Trimmed to what the role can reach |
Grids: No Create, no Delete, for a role without them |
What a permission looks like
Every permission is {package}.{subject}.{operation}, the same code Sylius' own resource
metadata produces:
sylius.product.update one operation on one resource
sylius.product.* everything on products
sylius.order.ship an operation that is not CRUD
*.*.index a read-only role, across the whole application
*.*.* a super administrator
A role stores the pattern as written, not the list of operations it matches today, so
sylius.product.* keeps working when Sylius adds a new operation to products later. See
The permission model.
Documentation
| Installation | Three steps with Flex, plus the two the recipe cannot do |
| The permission model | Identifiers, patterns, wildcards, how the tree is built |
| What gets enforced | The six surfaces, and what happens to a route nobody covered |
| Managing roles | Day-to-day use of the admin screens |
| Configuration reference | Every key under odiseo_sylius_rbac |
| Extending | Declaring permissions for your own routes and plugins |
| Console commands | grant, debug, migrate-permissions |
| Troubleshooting | Locked out, unexpected 403, orphaned declarations |
| Upgrading to 3.0 | What breaks, and how stored roles are migrated |
| Contributing | Running the test application and the suites |
Compatibility
| Plugin | Sylius | PHP | Symfony | Database |
|---|---|---|---|---|
^3.0 |
2.0 · 2.1 · 2.2 | 8.2 · 8.3 · 8.4 | 6.4 · 7.x | MySQL · MariaDB · PostgreSQL |
^2.0 |
1.12 · 2.0 | 8.0+ | 5.4 · 6.x | MySQL · MariaDB |
The schema migrations ship for MySQL/MariaDB and PostgreSQL. On any other engine they skip, and Doctrine records them as executed even so, so write your own before upgrading a 2.x database, see Upgrading to 3.0.
Only the latest minor is supported. Security fixes land on master.
Demo
Want a live walkthrough of this plugin? Get in touch, or browse all our Sylius plugins at odiseo.io.
Credits
This plugin is maintained by Odiseo. Want us to help you with this plugin or any Sylius project? Get in touch.
Running a marketplace? Vendor role separation is one of the things a multi-vendor marketplace for Sylius has to get right, and this plugin is how we do it.
License
MIT.



