FIX: Username for topic creation is required

This commit is contained in:
Robin Ward 2015-10-13 16:33:26 -04:00
parent ae4ef1e70f
commit 7802757306
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,10 @@ class Admin::EmbeddingController < Admin::AdminController
end
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.send("#{s}=", params[:embedding][s])
end

View File

@ -1195,6 +1195,7 @@ en:
embed_username_key_from_feed: "Key to pull discourse username from feed."
embed_truncate: "Truncate the embedded posts."
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_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."