Download the PHP package roshyo/rights-management-plugin without Composer
On this page you can find all versions of the php package roshyo/rights-management-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download roshyo/rights-management-plugin
More information about roshyo/rights-management-plugin
Files in roshyo/rights-management-plugin
Package rights-management-plugin
Short Description A rights management plugin for Sylius.
License MIT
Informations about the package rights-management-plugin
Sylius Rights Management Plugin
A rights management plugin for Sylius.
Installation
-
Run
-
Enable the plugin in config/bundles.php:
-
Add the following import to _sylius.yaml:
-
Add the following route to routes.yaml:
-
Update your database schema:
-
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
3) Then add the following snippet:
- Clear cache to load translation correctly
Usage
Group can only grant or deny access to listed routes. To list route, add to your config.yml.
Example:
Architecture is:
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
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
You can also ask your questions at the mail address in the composer.json mentioning this package.
Other
You can also check our other packages (including Sylius plugins) at https://github.com/BeHappyCommunication
All versions of rights-management-plugin with dependencies
sylius/sylius Version ^1.7
symfony/dotenv Version ^4.4
symfony/flex Version ^1.2