I own a Samsung Spica GT-i5700, how can I disable the power-off menu when the phone is locked. I am running CM7.
This feature is in Cerberus Anti Theft and also in some custom android Roms (Such as Exodous). It doesn't require root but like any anti-theft software there is a paid version as the free one is limited to 30 days. But you could try the Smart Screen Protector App which is also mentioned in one of the other answers.
I dont think it is possible with that ROM. What you can do is to change the button's task when phone is locked (like Activator on iOS). I think CM7 isn't supports this feature but you can simply find it by google it (button task changer or something like that).
Try the Smart Screen Protector application from the play store. It claims to disable the lock key when the screen is locked even with the pin. Doesn't require a ROOT device
If it does not work then you can increase the delay time as suggested by the app.
The Xposed plugin PowerMenuPlus may. If you add A fake power button and lock description, it will stop you device being turned off while locked, and confuse those trying to turn it off.