Procedure going from search query to an acl