Symfony2: how to get all entities of one type which are marked with “EDIT” ACL permission?

前端 未结 1 1145
北荒
北荒 2021-02-03 17:05

Can someone tell me how to get all entities of one type which are marked with \"EDIT\" ACL permission?

I would like to build a query with the Doctrine EntityManager.

相关标签:
1条回答
  • 2021-02-03 17:28

    I don't believe there's a default way of doing this. What you could do is to write your own service that adds a Filter to your Doctrine DQL queries.

    For more info, see:

    • https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/filters.html
    • https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/cookbook/dql-custom-walkers.html

    Hope this helps!

    0 讨论(0)
提交回复
热议问题