discourse-journal/extensions/post_creator.rb
angusmcleod 6a3fa08f0c version 0.2
- new sort order calculation
- new timeline
- new styles
- minor fixes
2021-07-12 20:15:39 +08:00

16 lines
313 B
Ruby

# frozen_string_literal: true
module DiscourseJournal
module PostCreatorExtension
def valid?
valid = super
return false if !valid
if @topic&.journal && post_is_journal_entry?(@post)
guardian.can_create_entry_on_topic?(@topic)
else
valid
end
end
end
end