diff --git a/backend/mixins.py b/backend/mixins.py index 5007f03741e7edad0fcd01b57277ef574a4cff5c..95a48a3dffdfa56d16ca22fe0f463ebffc0d86c6 100644 --- a/backend/mixins.py +++ b/backend/mixins.py @@ -22,16 +22,13 @@ class OverrideView(Exception): class VisitorMixin(NM2LayoutMixin): """ - Add self.visitor and self.impersonator to the View for the person visiting - the site + Add self.visitor to the View for the person visiting the site """ # Define to "dd" "am" or "admin" to raise PermissionDenied if the # given test on the visitor fails require_visitor = None def set_visitor_info(self): - self.impersonator = getattr(self.request, "impersonator", None) - if not self.request.user.is_authenticated: self.visitor = None else: @@ -70,7 +67,6 @@ class VisitorMixin(NM2LayoutMixin): def get_context_data(self, **kw): ctx = super(VisitorMixin, self).get_context_data(**kw) ctx["visitor"] = self.visitor - ctx["impersonator"] = self.impersonator return ctx diff --git a/nmlayout/templates/nm2-base.html b/nmlayout/templates/nm2-base.html index 18358e064f391990c788ff8a2356a1f2195e28a5..a6f10d24b85339d8c8b54ff52998dec8a1843d45 100644 --- a/nmlayout/templates/nm2-base.html +++ b/nmlayout/templates/nm2-base.html @@ -78,10 +78,10 @@ window.nm2.url_api_people = "{% url 'api_people' %}";