mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add specs for topic create with auto_close_time. Just ignore auto_close_time from users who are not authorized to use it instead of raising an error.
This commit is contained in:
@@ -55,7 +55,7 @@ class TopicCreator
|
||||
end
|
||||
|
||||
def setup_auto_close_time
|
||||
@guardian.ensure_can_moderate!(@topic)
|
||||
return unless @guardian.can_moderate?(@topic)
|
||||
@topic.set_auto_close(@opts[:auto_close_time], @user)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user