mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add 'Post.permitted_create_params' to allow plugins to add new params when creating a post
This commit is contained in:
@@ -561,6 +561,10 @@ class PostsController < ApplicationController
|
||||
:visible
|
||||
]
|
||||
|
||||
if Post.permitted_create_params.present?
|
||||
permitted.concat(Post.permitted_create_params.to_a)
|
||||
end
|
||||
|
||||
# param munging for WordPress
|
||||
params[:auto_track] = !(params[:auto_track].to_s == "false") if params[:auto_track]
|
||||
params[:visible] = (params[:unlist_topic].to_s == "false") if params[:unlist_topic]
|
||||
|
||||
Reference in New Issue
Block a user