The order comes after local residents who were observing or protesting immigration raids said their constitutional rights were violated by federal agents.