What we have here is a class that extends Mage_Catalog_Model_Product_Status, and adds two CONST variables, STATUS_PENDING and STATUS_PREVIEW.
What I am trying to find is the logic model that decides if a product appears in the frontend, preview is a special case here. I want to be able to see if a product is visible depending on if the user is a logged in admin, otherwise it will not display to customers in the search or by direct link.
So my goal is to find where the Varien router decides if a product is visible or if it should be redirected to our 404 page, extend the class and add filters to the query depending on if the user is an admin or not (e.g. changing it from STATUS_PREVIEW to STATUS_DISABLED if the user is not an admin)
Also in regards to catalog search, It was my impression that addVisibleFilterToCollection was supposed to handle this in the layer model on a product collection, however that method has been depreciated and is essentially useless in this case.
How can I control this in the product view and catalog search? If anyone could point me to the correct Models/Methods to handle this, I would greatly appreciate it, I have been at this for several hours trying to figure it out on my own.