Commit 95251c89 by Bach Dániel

dashboard: fix 403 error in TemplateDetail

parent 2c2f2091
...@@ -494,7 +494,7 @@ class TemplateDetail(LoginRequiredMixin, SuccessMessageMixin, UpdateView): ...@@ -494,7 +494,7 @@ class TemplateDetail(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
template = InstanceTemplate.objects.get(pk=kwargs['pk']) template = InstanceTemplate.objects.get(pk=kwargs['pk'])
if not template.has_level(request.user, 'owner'): if not template.has_level(request.user, 'user'):
raise PermissionDenied() raise PermissionDenied()
if request.is_ajax(): if request.is_ajax():
template = { template = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment