My company uses open source but the company will not contribute to it or allow you to contribute if it was anything related to work.
You can work on outside code projects, but they can't be related to the industry, help our competitors in any way, and we must get prior approval from the company.
I think most companies have restrictions like this. Your previous company seems a bit strict.