symfony - Symfony2 SyliusRbacBundle Setup -
i exploring option of using syliusrbacbundle app. manage install along fosuserbundle. when got setup part got following error on running command 'sylius:rbac:initialize' following instructions found here: http://docs.sylius.org/en/latest/bundles/syliusrbacbundle/setup.html#setup-roles-and-permissions-in-the-database
initializing sylius rbac roles , permissions. adding permission "update product". (app.product_update) adding permission "create product". (app.product_create) adding permission "manage product". (app.product_manage) [doctrine\dbal\dbalexception] exception occurred while executing 'insert sylius_role (code, name, description, security_roles, tree_left, tree_right, tree_level, created_at , updated_at, parent_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' params ["root", "root", null, "a:0:{}", null, null, null, "2015-05-11 16:45:34", "2015-05-11 16:45:34", null]: sqlstate[23000]: integrity constraint violation: 1048 column 'tree_left' ca nnot null [pdoexception] sqlstate[23000]: integrity constraint violation: 1048 column 'tree_left' ca nnot null sylius:rbac:initialize
this how config.yml looks like:
sylius_rbac: driver: doctrine/orm security_roles: role_administration_access: can access backend roles: app.admin: name: administrator description: administrator app.product_manager: name: product manager description: muchos productos permissions: [app.product_update, app.product_create] roles_hierarchy: app.admin: [app.product_manager] permissions: app.product_update: update product app.product_create: create product app.product_manage: manage product permissions_hierarchy: app.product_manage: [app.product_create, app.product_update]
any 1 has clue how solve it?
thanks!
the sylius/rbac
uses tree behaviour atlantic18/doctrineextensions
.
you can use in symfony system using stof/stofdoctrineextensionsbundle
.
once has been installed need enable tree behaviour in app/config/config.yml
like..
stof_doctrine_extensions: orm: default: tree: true
this should make listener register correctly , fields auto-populated.
Comments
Post a Comment