sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

Fail fast when using ACL as security handler without `security.acl.provider` service #7097

Closed franmomu closed 3 years ago

franmomu commented 3 years ago

Feature Request

From https://github.com/sonata-project/SonataAdminBundle/issues/7086

If a user is using ACL as security handler, then the sonata.admin.security.handler.acl service receives the security.acl.provider service as argument 3.

It would be nice to check if the user has chosen ACL as security handler and there is no security.acl.provider, then fail fast when parsing configuration.

VincentLanglet commented 3 years ago

We just have to add the check here: https://github.com/sonata-project/SonataAdminBundle/blob/3.x/src/DependencyInjection/SonataAdminExtension.php#L174 isn't it ? @franmomu

franmomu commented 3 years ago

Yep, I think so