DEV: Restrict include:unlisted search option to users that can view unlisted topics (#27977)

This commit is contained in:
Sérgio Saquetim
2024-07-18 16:33:14 -03:00
committed by GitHub
parent 6a3e12a39c
commit 4b20021033
2 changed files with 25 additions and 6 deletions

View File

@@ -937,7 +937,7 @@ class Search
nil
elsif word =~ /\Ainclude:(invisible|unlisted)\z/i
@include_invisible = true
@include_invisible = true if @guardian.can_see_unlisted_topics?
nil
else
found ? nil : word