FIX: Do not return restricted tags without access
This commit is contained in:
parent
411a0b5dc6
commit
caa15f3567
|
@ -125,6 +125,10 @@ module KnowledgeExplorer
|
|||
end
|
||||
end
|
||||
|
||||
allowed_tags = DiscourseTagging.filter_allowed_tags(Guardian.new(@user)).map(&:name)
|
||||
|
||||
tags = tags.select { |tag| allowed_tags.include?(tag[:id]) }
|
||||
|
||||
tags.sort_by { |tag| [tag[:active] ? 0 : 1, -tag[:count]] }
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue