forked from e621ng/e621ng
[Comments] Allow janitor to sticky
This commit is contained in:
parent
465a91a69f
commit
23fcee2356
@ -134,7 +134,8 @@ private
|
||||
def comment_params(context)
|
||||
permitted_params = %i[body]
|
||||
permitted_params += %i[do_not_bump_post post_id] if context == :create
|
||||
permitted_params += %i[is_sticky is_hidden] if CurrentUser.is_moderator?
|
||||
permitted_params += %i[is_sticky] if CurrentUser.is_janitor?
|
||||
permitted_params += %i[is_hidden] if CurrentUser.is_moderator?
|
||||
|
||||
params.fetch(:comment, {}).permit(permitted_params)
|
||||
end
|
||||
|
@ -9,7 +9,7 @@
|
||||
<% if comment.new_record? %>
|
||||
<%= f.input :do_not_bump_post, :label => "No bump" %>
|
||||
<% end %>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<%= f.input :is_sticky, :label => "Post as moderator", :for => "comment_is_sticky" %>
|
||||
<% if CurrentUser.is_janitor? %>
|
||||
<%= f.input :is_sticky, label: "Sticky" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
Loading…
Reference in New Issue
Block a user