I have once wrote about a rare security setup, in which there is a parent item that is less visible than a child. To recap, consider this setup:
home (allow read)|--news (deny read : browse only item) | --news_item (allow read)
Now theres another catch if you need to retrieve the 'news item' (in bold) using the api:
database.Items["/sitecore/content/home/news/news_item"] -> OK, news_itemdatabase.Items["{id-of-news_item}"] -> OK, news_itemdatabase.GetRootItem().Axes.SelectItems["/sitecore/content/home/news/news_item/*"] -> nulldatabase.GetRootItem().Axes.SelectItems["//news_item"] -> null (at least on sqlexpress)database.GetRootItem().Axes.SelectItems["//{id-of-news-item}"] -> OK, news_item(Tested on Sitecore 5.3 beta 060731)
Peter Johansson, who has the full credit for spotting this, made the following wrapper around SelectItems to be able to query over hidden items, but still respect security in the end:
As this is tested on beta version of Sitecore, I will followup if anything changes or I discover more. And now, it's time for a little vacation: see you on Monday.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.