Improve redaction and anonymous user handling
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import json
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.http import HttpResponse, HttpResponseForbidden, JsonResponse
|
||||
from django.shortcuts import render
|
||||
from django.views import View
|
||||
@@ -24,9 +23,8 @@ class Drilldown(View):
|
||||
def get(self, request):
|
||||
# if not request.user.has_plan(self.plan_name):
|
||||
# return render(request, "denied.html")
|
||||
is_anonymous = isinstance(request.user, AnonymousUser)
|
||||
if is_anonymous:
|
||||
sizes = ["5", "10", "15", "20"]
|
||||
if request.user.is_anonymous:
|
||||
sizes = settings.OPENSEARCH_MAIN_SIZES_ANON
|
||||
else:
|
||||
sizes = settings.OPENSEARCH_MAIN_SIZES
|
||||
context = {
|
||||
|
||||
Reference in New Issue
Block a user