mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
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 <jvalleroy@mailbox.org>
This commit is contained in:
parent
c78d96984b
commit
591ed5c4ae
@ -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')
|
||||
]
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user