mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: Username for topic creation is required
This commit is contained in:
@ -9,6 +9,10 @@ class Admin::EmbeddingController < Admin::AdminController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
if params[:embedding][:embed_by_username].blank?
|
||||||
|
return render_json_error(I18n.t('site_settings.embed_username_required'))
|
||||||
|
end
|
||||||
|
|
||||||
Embedding.settings.each do |s|
|
Embedding.settings.each do |s|
|
||||||
@embedding.send("#{s}=", params[:embedding][s])
|
@embedding.send("#{s}=", params[:embedding][s])
|
||||||
end
|
end
|
||||||
|
@ -1195,6 +1195,7 @@ en:
|
|||||||
embed_username_key_from_feed: "Key to pull discourse username from feed."
|
embed_username_key_from_feed: "Key to pull discourse username from feed."
|
||||||
embed_truncate: "Truncate the embedded posts."
|
embed_truncate: "Truncate the embedded posts."
|
||||||
embed_post_limit: "Maximum number of posts to embed."
|
embed_post_limit: "Maximum number of posts to embed."
|
||||||
|
embed_username_required: "The username for topic creation is required."
|
||||||
embed_whitelist_selector: "CSS selector for elements that are allowed in embeds."
|
embed_whitelist_selector: "CSS selector for elements that are allowed in embeds."
|
||||||
embed_blacklist_selector: "CSS selector for elements that are removed from embeds."
|
embed_blacklist_selector: "CSS selector for elements that are removed from embeds."
|
||||||
notify_about_flags_after: "If there are flags that haven't been handled after this many hours, send an email to the contact_email. Set to 0 to disable."
|
notify_about_flags_after: "If there are flags that haven't been handled after this many hours, send an email to the contact_email. Set to 0 to disable."
|
||||||
|
Reference in New Issue
Block a user