mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: allow users to wikify their own posts based on trust level
This commit is contained in:
parent
19c630e7c2
commit
06bac23e5f
10 changed files with 65 additions and 21 deletions
|
@ -305,9 +305,9 @@ class PostsController < ApplicationController
|
|||
end
|
||||
|
||||
def wiki
|
||||
guardian.ensure_can_wiki!
|
||||
|
||||
post = find_post_from_params
|
||||
guardian.ensure_can_wiki!(post)
|
||||
|
||||
post.revise(current_user, { wiki: params[:wiki] })
|
||||
|
||||
render nothing: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue