Eating from the fruit of trees in the courtyard of a mosque

Question
What is the ruling of eating from the fruit of trees that are in the courtyard of a mosque?
Answer

The Ruling depends on the intention of the person who paid for the trees to planted in the first place. If it was intended to be sold and used for the good of the mosque then the fruits cannot be eaten, rather they should be sold and the money used to pay for what the mosque needs. On the other hand, if the person who planted the trees intended them for anyone who comes to pray in the mosque, then they are allowed to eat from it. Hence, it all depends on the intention of the one who planted the trees in the first place.