Update the Search functionality to include a separate clause for permissions, so that we can do a permissions and filters clause