I've installed the plugin as the getting started guide tells us.
I've been surprised that the administrator doesn't have all the permissions, even after executing the following command bim/console sylius-rbac:grant-access-to-given-administrator [email protected] administrator catalogManagement configuration customerManagement marketingManagement salesManagement
.
I took a look into the database. I've been surprised to stumble upon these permissions data:
{"catalogManagement":"{\"type\":\"catalogManagement\",\"operation_types\":[\"read\",\"write\"]}","configuration":"{\"type\":\"configuration\",\"operation_types\":[\"read\",\"write\"]}","customerManagement":"{\"type\":\"customerManagement\",\"operation_types\":[\"read\",\"write\"]}","marketingManagement":"{\"type\":\"marketingManagement\",\"operation_types\":[\"read\",\"write\"]}","salesManagement":"{\"type\":\"salesManagement\",\"operation_types\":[\"read\",\"write\"]}"}
As you can see, the types are all camel-cased. The types in the \Odiseo\SyliusRbacPlugin\Model\Permission
class are all snake-cased. If I change the case to be
{"catalog_management":"{\"type\":\"catalog_management\",\"operation_types\":[\"read\",\"write\"]}","configuration":"{\"type\":\"configuration\",\"operation_types\":[\"read\",\"write\"]}","customer_management":"{\"type\":\"customer_management\",\"operation_types\":[\"read\",\"write\"]}","marketing_management":"{\"type\":\"marketing_management\",\"operation_types\":[\"read\",\"write\"]}","sales_management":"{\"type\":\"sales_management\",\"operation_types\":[\"read\",\"write\"]}"}
all works, folks.