min_post_length is not enforced on the server for admins


(Sam Saffron) #1
  1. Set Discourse.SiteSettings.min_post_length = 0 in console
  2. Open composer
  3. Make post

(Sam Saffron) #2

x


(Sam Saffron) #3

This only happens if you are an admin, but is rather odd.

cc @neil @codinghorror


(Robin Ward) #4

Believe this was intentional. If admins want to skip validations they can! @neil did it.


(Jeff Atwood) #5

Yes, wasn’t it related to the TOS, Privacy Policy, and FAQ/Guidelines changes @sam?


(Sam Saffron) #6

Yeah, though I would only bypass this for “system” … admins still should go through normal pipeline otherwise all sorts of bugs are hidden

cc @neil


(Neil Lalonde) #7

Scoping it to system won’t solve anything. PostCreator’s skip_validations does the trick when seeding the topic.

It’s when an admin tries to edit the topics and can’t because the legal docs are longer than the max post length where we need a solution. I’ll change it so that if topic_id matches one of these doc id’s and post_number == 1 and user is admin, then use different post and title length limits. Ugly, but we need it.