Is there an option to prevent all posts or turn login off?

I pushed a commit for this:
https://github.com/discourse/discourse/commit/2ffddfb32cd68ed749bdc6a59fe94b843b52e717