Display most recent discussion title in categories only if the user has the permissions to view it
I'm looking for a way to display "most recent discussion title" in categories list only if the current user has permission to see it. For example, if I have the following tree :
Root -> Category A -> Category A1
If user 1 can access to category A1 and posts something there in topic 'Private discussions'. In root categories listing, everyone will see in the Category A most recent discussion title : 'Private discussions'. Even if he has no rights to see it. Then when someone not authorized click on this link, he is asked to sign in or a 'forbidden page' is shown. I don't think this is good for UX. Furthermore in some case it might be problematic because some topic titles can be explicit, and give clues of what is being talked about to unwanted people.
In this case, if user 2 only has access to Category A, I think that for him, the "most recent discussion title" should be something in Category A, even if something newer is posted in category A1.
Does anyone know if there is a way to display the most recent discussion title depending on the current user ?
Thx for your help :)