misc: always pass user as keyword argument to cell.is_visible (#41648)
This commit is contained in:
parent
90a7560e98
commit
ef91364999
|
@ -57,7 +57,7 @@ class DashboardAddTileView(View):
|
|||
cell = CellBase.get_cell(kwargs['cell_reference'])
|
||||
if not cell.page.is_visible(request.user):
|
||||
raise PermissionDenied()
|
||||
if not cell.is_visible(request.user):
|
||||
if not cell.is_visible(user=request.user):
|
||||
raise PermissionDenied()
|
||||
cell.pk = None
|
||||
cell.page = dashboard.page
|
||||
|
|
|
@ -34,7 +34,7 @@ def dataviz_graph(request, *args, **kwargs):
|
|||
cell = ChartNgCell.objects.get(id=kwargs.get('cell'))
|
||||
if not cell.page.is_visible(request.user):
|
||||
raise PermissionDenied()
|
||||
if not cell.is_visible(request.user):
|
||||
if not cell.is_visible(user=request.user):
|
||||
raise PermissionDenied()
|
||||
if not cell.cached_json:
|
||||
raise Http404('misconfigured cell')
|
||||
|
|
|
@ -29,7 +29,7 @@ class GeojsonView(View):
|
|||
cell = Map.objects.get(pk=kwargs['cell_id'])
|
||||
except Map.DoesNotExist:
|
||||
raise Http404()
|
||||
if cell.page.is_visible(request.user) and cell.is_visible(request.user):
|
||||
if cell.page.is_visible(request.user) and cell.is_visible(user=request.user):
|
||||
geojson = cell.get_geojson(request)
|
||||
content_type = 'application/json'
|
||||
return HttpResponse(json.dumps(geojson), content_type=content_type)
|
||||
|
|
Loading…
Reference in New Issue