Apply ACL restriction filters for a search query

This method needs a LOOOOTS of comments !