Whether or not the law is applied retroactively, it's a Constitutionally-prohibeted bill of attainder. The only Constitutionally-valid approach is to add such restrictions to the offender's sentence (which must be done explicitly for each case by the judge, when the sentence is imposed, not afterward.)