mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:51:25 +08:00
FEATURE: Allow category moderators to set auto deletion topic timers (#19383)
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
This commit is contained in:

committed by
GitHub

parent
86d49f4fb1
commit
9f3760cfd8
@ -497,6 +497,10 @@ class TopicsController < ApplicationController
|
||||
topic = Topic.find_by(id: params[:topic_id])
|
||||
guardian.ensure_can_moderate!(topic)
|
||||
|
||||
if TopicTimer.destructive_types.values.include?(status_type)
|
||||
guardian.ensure_can_delete!(topic)
|
||||
end
|
||||
|
||||
options = {
|
||||
by_user: current_user,
|
||||
based_on_last_post: based_on_last_post
|
||||
|
Reference in New Issue
Block a user