-1

I have 3 roles: ROLE_SUPER_ADMIN, ROLE_ADMIN and ROLE_USER. Both Super_Admins and Admins can view users but a user with ROLE_ADMIN shouldn't see a user with ROLE_SUPER_ADMIN. I've made a voter but I don't know where to use the annotation on a controller extending from AbstractCrudController.

AS G
  • 1
  • 2
  • 1

1 Answers1

0

Found a way by using the createIndexQueryBuilder() and injecting the Security component to check user role

AS G
  • 1
  • 2
  • 1