It is permissible to keep some one from passing in front of a person who is praying.
If a praying person has a sutrah in front of him, then it is allowed for him to prevent any human or animal from passing in front of him. If a person passes in front of him from beyond the sutrah, then the person in salah is neither to prevent the passer-by nor will he be harmed by him.
Abu Saleh as-Saman said: “I will narrate to you what I heard and saw from Abu Sa’id al-Khudri. One day I was with Abu Sa’id and he was offering salah on Friday facing something which concealed him from the people when a young man from the tribe of Mu’ait came and tried to pass in front of Abu Sa’id. He pushed him back. He tried again and Abu Sa’id struck him harder. The two scuffled. The man went to Marwan to complain. Abu Sa’id also went to Marwan. Marwan asked: ‘What has happened between you and the son of your brother that caused him to complain?’ Abu Sa’id said: ‘I heard the Prophet sallallahu alehi wasallam say: ‘If any of you prays toward a sutrah and someone tries to pass in front of you, then turn him away. If he refuses, use force for he is a devil.”‘ This is related by al-Bukhari and Muslim.