mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:04:53 +08:00
FEATURE: Allow posting via email to read-only mailing list mirror category
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user