The legal fraternity has accused the Abbott government of undermining the rule of law through retrospective legislation to prevent court challenges to the approval of mining projects where conservation advice is ignored.