Я изучаю возможность использования SyliusRbacBundle для моего приложения. Мне удается установить его вместе с FosUserBundle. Когда я добрался до установки части я получил следующую ошибку, выполнив команду «sylius: RBAC: инициализация», следуя инструкциям, найденных здесь: http://docs.sylius.org/en/latest/bundles/SyliusRbacBundle/setup.html#setup-roles-and-permissions-in-the-databaseSymfony2 SyliusRbacBundle Setup
Initializing Sylius RBAC roles and 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]
An exception occurred while executing 'INSERT INTO sylius_role (code, name,
description, security_roles, tree_left, tree_right, tree_level, created_at
, updated_at, parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with 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 be null
[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tree_left' ca
nnot be null
sylius:rbac:initialize
Это как мой config.yml выглядит следующим образом:
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]
У любого есть ключ, как его решить?
Спасибо!
Вы установили его правильно, как указано здесь? http://docs.sylius.org/en/latest/bundles/SyliusRbacBundle/installation.html –