Yes there is, via the rails console:
Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)