If the door doesn’t lock, hang a sign outside when you are pumping, or ask if your employer could have a lock installed for privacy.
Use a shower curtain rod or wooden dowel from a hardware store to hang a large curtain outside your cubicle when you need to pump.
For reasons of safety and hygiene, a bathroom should only be used for pumping breast milk if there are no other options available.