I have implemented things that are illegal. I objected against it in meetings, and it was one of the reasons I left that company. What exactly are you supposed to do as a developer? In general, I think all these trickster managers are just making things harder for everybody. It often feels like their decisions are based on a mindset rather than something that they can back up with real data.
> What exactly are you supposed to do as a developer?
I don't quite understand what you're trying to say. If you were asked to kill someone, clearly you wouldn't say "what are you supposed to do anyway" and go off to find a murder weapon since the answer there is rather obvious. What makes being asked to violate a different law different? (Assuming you find the request morally objectionable, I've probably violated laws that I thought were counterproductive for everyone.)
Because it _is_ different. If you asked me to kill someone for 1 Mil. $, I wouldn't do it. If you asked me to drive 20km/h faster than the legal limit for 10K $, I wouldn't even blink, it's a easy choice.
Now, how severe is this? You're not a lawyer, you can bring it up, and the company lawyers (that are paid maybe more than you are) say they reviewed the spec and it's legal. What standing do you have, as a developer, to say "no it's not legal, I won't do it!". Do you really know better than the lawyers?
[edit]
> If you were asked to kill someone, clearly you wouldn't say "what are you supposed to do anyway" and go off to find a murder weapon since the answer there is rather obvious.
What if you were a soldier? Or a drone pilot? Is the answer still obvious?
> 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).