FEATURE: Allow group moderators to add/remove staff notes (#10252)

* FEATURE: Allow group moderators to add/remove staff notes
This commit is contained in:
jbrw
2020-07-20 15:53:47 -04:00
committed by GitHub
parent 44cfa25d7d
commit 7ab5658462
12 changed files with 110 additions and 19 deletions

View File

@ -474,9 +474,8 @@ class PostsController < ApplicationController
end
def notice
raise Discourse::NotFound unless guardian.is_staff?
post = find_post_from_params
raise Discourse::NotFound unless guardian.can_edit_staff_notes?(post.topic)
if params[:notice].present?
post.custom_fields[Post::NOTICE_TYPE] = Post.notices[:custom]