Commit b18746e7 authored by Sli's avatar Sli

core: fix error 500 when accessing user tools with anonymous user

parent a2b431b1
Pipeline #1917 passed with stage
in 25 minutes and 9 seconds
......@@ -770,6 +770,11 @@ class UserToolsView(QuickNotifMixin, UserTabsMixin, TemplateView):
template_name = "core/user_tools.jinja"
current_tab = "tools"
def dispatch(self, request, *args, **kwargs):
if request.user.is_anonymous:
raise PermissionDenied
return super(UserToolsView, self).dispatch(request, *args, **kwargs)
def get_context_data(self, **kwargs):
self.object = self.request.user
from launderette.models import Launderette
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 to comment