It is lawful for a person who is in peaceable possession of a dwelling, and any person lawfully assisting him or her or acting by his or her authority, to use force to prevent or repel another person from unlawfully entering or remaining in the dwelling, if the person using the force believes on reasonable grounds—
(a) the other person is attempting to enter or to remain in the dwelling with intent to commit an indictable offence in the dwelling; and
(b) it is necessary to use that force.