When on a world the cheats are disabled, it is still possible to access them by doing "Open to LAN" > "Allow Cheats: ON". This is a bug because I have selected to not have cheats, the temptation is too high.
Related issues
Comments


And that's why it's time to change it. Already in the 1.8 they made per-world difficulty and locking of it, why not this?
It's not a bug, its intended. It has always been that way.