> company lawyers [say] they reviewed the spec and it's legal. [...] Do you really know better than the lawyers?
I'd be very surprised if anyone thought this was clearly legal after reading the law. But yeah, that would be a valid answer to the question: legal team says it's legal. If something is legal, you cannot be prosecuted for it, and you can have some reasonable confidence in lawyers reading the law and providing legal council correctly.
However, you were saying "I have implemented things that are illegal. I objected against it in meetings", so I was more thinking from the scenario where everyone knows it's illegal but the dev is asked to do it anyway. Presumably not even explicitly, just implicit "we need this feature" without ever bringing up "and we know it's illegal, but if you want to keep your healthcare..."
I mean, you don't even talk directly to lawyers, it's the managers telling you that "this underwent legal review". What are you going to do, say "no it didn't"? Maybe it did. Maybe they did say it was ok.
If you have your direct manager outright lying to you and you're indeed not absolutely certain about the legal situation yourself, yeah that's a tough situation. I don't readily have advice in that case, aside from 'shit manager, might want to consider leaving' (which is obviously only possible in luxury positions).
I'd be very surprised if anyone thought this was clearly legal after reading the law. But yeah, that would be a valid answer to the question: legal team says it's legal. If something is legal, you cannot be prosecuted for it, and you can have some reasonable confidence in lawyers reading the law and providing legal council correctly.
However, you were saying "I have implemented things that are illegal. I objected against it in meetings", so I was more thinking from the scenario where everyone knows it's illegal but the dev is asked to do it anyway. Presumably not even explicitly, just implicit "we need this feature" without ever bringing up "and we know it's illegal, but if you want to keep your healthcare..."