I might be very out of the law context, but let's put it in these terms: if you worked for a restaurant, couldn't you be a volunteer in a free kitchen for the poors?
Of course I don't have the context of what is your company business, but still, not being able to do any public side project (even getting some revenue from them) looks like controlling you in an unacceptable way. I'd follow the suggestions on the other comments, of checking your legal rights and your context legislation. Maybe getting some legal counciling to study your particular case.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I might be very out of the law context, but let's put it in these terms: if you worked for a restaurant, couldn't you be a volunteer in a free kitchen for the poors?
Of course I don't have the context of what is your company business, but still, not being able to do any public side project (even getting some revenue from them) looks like controlling you in an unacceptable way. I'd follow the suggestions on the other comments, of checking your legal rights and your context legislation. Maybe getting some legal counciling to study your particular case.