This is, as I can tell, used by content search and only content search for the UI construction. I could try to refactor this code if you like, at the time I was trying to avoid doing major re-structuring and simply patch in the authorization.