Stopping from salaah with jamaat

Answered according to Hanafi Fiqh by Darulifta-Deoband.com
Recently I visited a Darul Uloom and I saw that the madrasa authorities lock the boarding gates when takbir ula is said for salah, which prevents some students who get late from reading salah with jamah. Is this permissible for the madrasa to do? Will this fall under Ayat 114 of surah Baqarah? The authorities make Qiyas on the ruling that when a person on purpose misses his salah, he is locked in jail and as long as they are in jail they are prevented from reading salah with jamah, in this case the Islamic state is not guilty of the verse in surah Baqarah so why are the madrasa authorities. Is this Qiyas correct? The Darul Uloom says we do this for the tarbiyat of the students. Is it correct to adopt these measures? Please could you provide Shariah proofs from the Quran, Hadith, Ijma or Qiyas for your answer?

بسم الله الرحمن الرحيم

(Fatwa: 815/B-164/TB=1434)

It belongs to administrative affairs. Neither you nor I have any right to object it. It is a kind of training to get together all the students after azan for salah. In view of closed gate each and every student would come there earlier and would offer salah with first takbir.

Allah knows Best!

Darul Ifta,
Darul Uloom Deoband

This answer was collected from the official ifta website of Darul Uloom Deoband in India.