mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-29 06:38:47 +01:00
* Fixed forwards definition
* Cleanup * Do not check for release requests if the user is a simple user (see #227) see #204
This commit is contained in:
+2
-4
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# coding: utf-8
|
||||
import re
|
||||
from django.http import Http404, HttpResponseRedirect
|
||||
from modoboa.admin.models import Extension
|
||||
@@ -31,8 +30,7 @@ class CommonExceptionCatcher(object):
|
||||
return None
|
||||
|
||||
if not request.is_ajax():
|
||||
return _render_error(request, errortpl="error_simple",
|
||||
user_context=dict(error=str(exception)))
|
||||
return _render_error(request, user_context=dict(error=str(exception)))
|
||||
|
||||
return ajax_response(request, status="ko", respmsg=str(exception),
|
||||
norefresh=True)
|
||||
|
||||
@@ -61,11 +61,11 @@ def display_messages(msgs):
|
||||
""" % (level, text, timeout)
|
||||
|
||||
@register.simple_tag
|
||||
def extra_head_content():
|
||||
def extra_head_content(user):
|
||||
tpl = Template("{% for sc in static_content %}{{ sc|safe }}{% endfor %}")
|
||||
return tpl.render(
|
||||
Context(
|
||||
dict(static_content=events.raiseQueryEvent("GetStaticContent"))
|
||||
dict(static_content=events.raiseQueryEvent("GetStaticContent", user))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user