Download the PHP package behappy/rights-management-plugin without Composer
On this page you can find all versions of the php package behappy/rights-management-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download behappy/rights-management-plugin
More information about behappy/rights-management-plugin
Files in behappy/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 app/AppKernel.php:
-
Add the following import to config.yml:
-
Add the following route to routing.yml:
-
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:
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