i have implemented search for a custom entity called UserAssignment using search.yml.In Search field present in navigation block i am able to get search text result as expected.This custom entity has access only by Admin.When any other user other than Admin login he will not be able to access that entity But issue is when i try searching for some data which exist in Custom entity also those result would also be displayed to the user who dont have access to that entity But when he tries to click the result’s link url then it would give u dont have permission to view message which is correct as view operation for that Custom Entity has been restricted only to Admin.
I Think i am missing some ACL that has to be declared in search.yml of Custom Entity so that the whole custom entity data should not be available to users other than Admin in search suggestion & result . I tried looking for other search.yml files implementation but could not get any clue from them to solve this issue.
search.yml file for UserAssignment Custom Entity given below:YAML1234567891011121314151617Custom\Bundle\UserAssignmentBundle\Entity\UserAssignment:alias: user_reassigment_mappertitle_fields: [userFrom]route:name: usr_reassignment_viewparameters:id: idsearch_template: CustomUserAssignmentBundle:Search:result.html.twigfields:-name: userFromtarget_type: texttarget_fields: [userFrom]-name: userTotarget_type: texttarget_fields: [userTo]
Please need some help on how to overcome with this issue.
Thanks & Regards,
You must be logged in to reply to this topic.