Skip to content
Snippets Groups Projects
Commit a67f809c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

security issue that allowed not logged user to access template data

parent 8fb46044
No related branches found
No related tags found
1 merge request!115Resolve "PDP study patient data"
Pipeline #
......@@ -2,6 +2,7 @@
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect, render
from django.utils.decorators import method_decorator
from django.views.generic.base import ContextMixin
from notifications import get_notifications
......@@ -53,11 +54,15 @@ def extend_context(params, request):
return final_params
@method_decorator(login_required, name='dispatch')
class WrappedView(ContextMixin):
def get_context_data(self, **kwargs):
context = super(WrappedView, self).get_context_data(**kwargs)
return extend_context(context, self.request)
def dispatch(self, *args, **kwargs):
return super(WrappedView, self).dispatch(*args, **kwargs)
import auth
import appointment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment