From 591ed5c4ae5d4154b66fb3c59b5ff54bcf53839b Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 14 Feb 2020 15:57:03 -0800 Subject: [PATCH] jsxc: Bypass issue with stronghold to get the app working again stronghold seems to have an issue with Django 2.1 decorators. A fix has not been released yet. Closes: #1697. Tests: - Functional tests for JSXC. - Vist JSXC, login using FreedomBox account. Chat rooster becomes available. - Log out, ensure that JSXC page is available. - Log in, ensure that JSXC page is available. Reviewed-by: James Valleroy --- plinth/modules/jsxc/urls.py | 3 ++- plinth/modules/jsxc/views.py | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/plinth/modules/jsxc/urls.py b/plinth/modules/jsxc/urls.py index 19ff648d0..c5c9ae9b4 100644 --- a/plinth/modules/jsxc/urls.py +++ b/plinth/modules/jsxc/urls.py @@ -19,10 +19,11 @@ URLs for the JSXC module """ from django.conf.urls import url +from stronghold.decorators import public from .views import JSXCAppView, JsxcView urlpatterns = [ url(r'^apps/jsxc/$', JSXCAppView.as_view(), name='index'), - url(r'^apps/jsxc/jsxc/$', JsxcView.as_view(), name='jsxc') + url(r'^apps/jsxc/jsxc/$', public(JsxcView.as_view()), name='jsxc') ] diff --git a/plinth/modules/jsxc/views.py b/plinth/modules/jsxc/views.py index ca3b804f2..c2db27497 100644 --- a/plinth/modules/jsxc/views.py +++ b/plinth/modules/jsxc/views.py @@ -18,9 +18,7 @@ Views for the JSXC module """ -from django.utils.decorators import method_decorator from django.views.generic import TemplateView -from stronghold.decorators import public from plinth.modules import config, jsxc from plinth.views import AppView @@ -41,11 +39,6 @@ class JsxcView(TemplateView): """A simple page to embed Javascript XMPP Client library.""" template_name = 'jsxc_launch.html' - @method_decorator(public) - def dispatch(self, *args, **kwargs): - """Dispatch a get, post etc. request.""" - return super().dispatch(*args, **kwargs) - def get_context_data(self, *args, **kwargs): """Add domain information to view context.""" context = super().get_context_data(*args, **kwargs)