FEATURE: Allow posting via email to read-only mailing list mirror category

This commit is contained in:
Gerhard Schlager
2018-01-04 13:38:06 +01:00
parent d7cd7e4dc7
commit e0d73a957d
3 changed files with 31 additions and 5 deletions

View File

@ -451,7 +451,7 @@ module Email
category = destination[:obj]
raise StrangersNotAllowedError if user.staged? && !category.email_in_allow_strangers
raise InsufficientTrustLevelError if !user.has_trust_level?(SiteSetting.email_in_min_trust)
raise InsufficientTrustLevelError if !user.has_trust_level?(SiteSetting.email_in_min_trust) && !sent_to_mailinglist_mirror?
create_topic(user: user,
raw: body,
@ -753,6 +753,11 @@ module Email
options[:raw] << Email::Receiver.elided_html(options[:elided])
end
if sent_to_mailinglist_mirror?
options[:skip_validations] = true
options[:skip_guardian] = true
end
user = options.delete(:user)
result = NewPostManager.new(user, options).perform