We needed to distribute some files to individual users through our site. Each file is meant exactly for one user. Hence we created the download pages using custom content type and added a field to identify the intended user. To restrict the users from going to unintended pages we wrote rules so that an error message will be displayed saying that the content is not accessible and to redirect to some other page.
Now the head ache is that, we need to add a search form to search all contents in the site. We need to display only the accessible contents in the result.
Kindly suggest a way so that we can avoid showing the inaccessible contents in the search results.