Add view support to search.
Add permission checks to search.