mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 16:40:36 +00:00
Don't allow remote search results for logged out users
This commit is contained in:
parent
499c4e3267
commit
9caad56ffc
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,9 @@ class Search(View):
|
|||
query = request.GET.get("q")
|
||||
min_confidence = request.GET.get("min_confidence", 0.1)
|
||||
search_type = request.GET.get("type")
|
||||
search_remote = request.GET.get("remote", False)
|
||||
search_remote = (
|
||||
request.GET.get("remote", False) and request.user.is_authenticated
|
||||
)
|
||||
|
||||
if is_api_request(request):
|
||||
# only return local book results via json so we don't cascade
|
||||
|
|
Loading…
Reference in a new issue