The Locks rollout locks an object’s ability to transform along particular local axes.
To lock all move transforms:
 X, Y, and Z. Only rotate and scale transforms will work.
The object does not need to be part of a hierarchy.

 X and Y are turned on, you'll be able to rotate the object only around the Z axis. All locks are relative to an object's local coordinate system.