Rights of immigrants detained in Massachusetts