Apply ACL restriction filters for a search query

We can replace this loop with a simple call to `$appbox->get_databox($record['databox_id'])`