Authorization implementation on elastic search results

We have a requirement to show/hide data to logged in User based on User permissions on each record that we have in Elasticsearch. The algorithm to check if the User has permissions on a given record requires to check multiple things and is dynamic in nature that can change anytime. Is there any design pattern on how to implement this