This is just as depressing. Employers should have zero rights to code their employees write on their own time unless the employee is using employer specific IP / resources or creating a direct competitor. Needing to get permission should not even be a thing.