I've found a solution.
There are two sections in this file:
/usr/share/polkit-1/actions/org.freedesktop.upower.policy
the first for suspend and the second for hibernate.
Near the end of each section will be a line with:
Code:
<allow_active>yes</allow_active>
It should be changed from “yes” to “no” to disable hibernate/suspend:
Code:
<allow_active>no</allow_active>