Question about the user rights.

28 views
Skip to first unread message

Ponrad C

unread,
Nov 27, 2016, 6:50:05 AM11/27/16
to Sylius
Hi all, I'm wondering if there is a possibility to use multiple privileges for the users in Silius, that you can habe different roles for specific users like: one can see the cart and goes through all products, but the another for example can't see the cart and can just modify some specified product or category.
How are the users integrated into Sylius? Is thta some symfony bundle?

Thanks for any answer.

Best regards,
Ponrad

mt...@lovethesign.com

unread,
Nov 28, 2016, 8:46:20 AM11/28/16
to Sylius
if you take a look in the field security_roles of the table sylius_role you'll realize that a sylius_user can have a role with multiple security_roles.

e.g: (the content of the fiels sylius_roles for the role of my admin user.)
{i:0;s:26:"ROLE_ADMINISTRATION_ACCESS";i:1;s:22:"ROLE_ALLOWED_TO_SWITCH";i:2;s:15:"ROLE_API_ACCESS";}

The thing that i'm not totally sure about is where to have the list of available roles.

M

Ponrad C

unread,
Nov 29, 2016, 4:14:14 PM11/29/16
to Sylius
Thanks for your reply, that is good to know that we're able to operate with the rights, but as you mentioned, where is the list of possible roles and how to create a new one?
i.e Searching for ROLE_API_ACCESS in sylius gives me only that this role is sets up in security.yml :)
Reply all
Reply to author
Forward
0 new messages