Lock rotation in 3D view

Slicer provides the option to lock tilt in the 3D view. Is there a way to lock rotation around any axis?

This is currently implemented for “horizontal tilt” only (5.0.3) in order to make it not too complicated.