Make the inhibit locks inhibit the actions

Also refactors some of the logging code to remove duplications.
Not sure if the can or auth checks should return FALSE if there's
an inhibit lock on the action... but that can be easily added in
the future.