mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: can_tag method called without guardian variable
This commit is contained in:
parent
d4b2e840cb
commit
776ab73a8d
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ module DiscourseTagging
|
||||||
TAGS_FILTER_REGEXP = /[\/\?#\[\]@!\$&'\(\)\*\+,;=\.%\\`^\s|\{\}"<>]+/ # /?#[]@!$&'()*+,;=.%\`^|{}"<>
|
TAGS_FILTER_REGEXP = /[\/\?#\[\]@!\$&'\(\)\*\+,;=\.%\\`^\s|\{\}"<>]+/ # /?#[]@!$&'()*+,;=.%\`^|{}"<>
|
||||||
|
|
||||||
def self.tag_topic_by_names(topic, guardian, tag_names_arg, append: false)
|
def self.tag_topic_by_names(topic, guardian, tag_names_arg, append: false)
|
||||||
if can_tag?(topic)
|
if guardian.can_tag?(topic)
|
||||||
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, guardian) || []
|
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, guardian) || []
|
||||||
|
|
||||||
old_tag_names = topic.tags.pluck(:name) || []
|
old_tag_names = topic.tags.pluck(:name) || []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue