mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Merge branch 'master' into feature/resizable_mailbox_list
This commit is contained in:
@@ -629,8 +629,10 @@ template but need javascript stuff.
|
||||
|
||||
*Callback prototype*::
|
||||
|
||||
def callback(user): pass
|
||||
def callback(caller, user): pass
|
||||
|
||||
* ``caller`` is name of the application (or the location) responsible
|
||||
for the call
|
||||
* ``user`` is a ``User`` instance corresponding to the currently
|
||||
logged in user
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
Modoboa's documentation!
|
||||
========================
|
||||
|
||||
This documentation refers to version |release|.
|
||||
|
||||
***************
|
||||
Getting started
|
||||
***************
|
||||
@@ -49,12 +47,3 @@ Additional resource
|
||||
|
||||
additional/migrating
|
||||
additional/virtualmachine
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
|
||||
@@ -158,17 +158,17 @@ class AutoRepliesMap(MapFile):
|
||||
class RelayDomainsTransportMap(MapFile):
|
||||
category = "relaydomains"
|
||||
filename = "sql-relaydomains-transport.cf"
|
||||
mysql = "SELECT CONCAT(srv.name, ':') FROM postfix_relaydomains_service AS srv INNER JOIN postfix_relaydomains_relaydomain AS rdom ON rdom.service_id=srv.id WHERE rdom.enabled=1 AND rdom.name='%s'"
|
||||
postgres = "SELECT srv.name || ':' FROM postfix_relaydomains_service AS srv INNER JOIN postfix_relaydomains_relaydomain AS rdom ON rdom.service_id=srv.id WHERE rdom.enabled AND rdom.name='%s'"
|
||||
sqlite = "SELECT srv.name || ':' FROM postfix_relaydomains_service AS srv INNER JOIN postfix_relaydomains_relaydomain AS rdom ON rdom.service_id=srv.id WHERE rdom.enabled=1 AND rdom.name='%s'"
|
||||
mysql = "SELECT CONCAT(srv.name, ':') FROM postfix_relay_domains_service AS srv INNER JOIN postfix_relay_domains_relaydomain AS rdom ON rdom.service_id=srv.id WHERE rdom.enabled=1 AND rdom.name='%s'"
|
||||
postgres = "SELECT srv.name || ':' FROM postfix_relay_domains_service AS srv INNER JOIN postfix_relay_domains_relaydomain AS rdom ON rdom.service_id=srv.id WHERE rdom.enabled AND rdom.name='%s'"
|
||||
sqlite = "SELECT srv.name || ':' FROM postfix_relay_domains_service AS srv INNER JOIN postfix_relay_domains_relaydomain AS rdom ON rdom.service_id=srv.id WHERE rdom.enabled=1 AND rdom.name='%s'"
|
||||
|
||||
|
||||
class RelayDomainAliasesTransportMap(MapFile):
|
||||
category = "relaydomains"
|
||||
filename = "sql-relaydomain-aliases-transport.cf"
|
||||
mysql = "SELECT CONCAT(srv.name, ':') FROM postfix_relaydomains_service AS srv INNER JOIN postfix_relaydomains_relaydomain AS rdom ON rdom.service_id=srv.id INNER JOIN postfix_relaydomains_relaydomainalias AS rdomalias ON rdom.id=rdomalias.target_id WHERE rdom.enabled=1 AND rdomalias.enabled=1 AND rdomalias.name='%s'"
|
||||
postgres = "SELECT srv.name || ':' FROM postfix_relaydomains_service AS srv INNER JOIN postfix_relaydomains_relaydomain AS rdom ON rdom.service_id=srv.id INNER JOIN postfix_relaydomains_relaydomainalias AS rdomalias ON rdom.id=rdomalias.target_id WHERE rdom.enabled AND rdomalias.enabled AND rdomalias.name='%s'"
|
||||
sqlite = "SELECT srv.name || ':' FROM postfix_relaydomains_service AS srv INNER JOIN postfix_relaydomains_relaydomain AS rdom ON rdom.service_id=srv.id INNER JOIN postfix_relaydomains_relaydomainalias AS rdomalias ON rdom.id=rdomalias.target_id WHERE rdom.enabled=1 AND rdomalias.enabled=1 AND rdomalias.name='%s'"
|
||||
mysql = "SELECT CONCAT(srv.name, ':') FROM postfix_relay_domains_service AS srv INNER JOIN postfix_relay_domains_relaydomain AS rdom ON rdom.service_id=srv.id INNER JOIN postfix_relay_domains_relaydomainalias AS rdomalias ON rdom.id=rdomalias.target_id WHERE rdom.enabled=1 AND rdomalias.enabled=1 AND rdomalias.name='%s'"
|
||||
postgres = "SELECT srv.name || ':' FROM postfix_relay_domains_service AS srv INNER JOIN postfix_relay_domains_relaydomain AS rdom ON rdom.service_id=srv.id INNER JOIN postfix_relay_domains_relaydomainalias AS rdomalias ON rdom.id=rdomalias.target_id WHERE rdom.enabled AND rdomalias.enabled AND rdomalias.name='%s'"
|
||||
sqlite = "SELECT srv.name || ':' FROM postfix_relay_domains_service AS srv INNER JOIN postfix_relay_domains_relaydomain AS rdom ON rdom.service_id=srv.id INNER JOIN postfix_relay_domains_relaydomainalias AS rdomalias ON rdom.id=rdomalias.target_id WHERE rdom.enabled=1 AND rdomalias.enabled=1 AND rdomalias.name='%s'"
|
||||
|
||||
|
||||
class PostfixMapsCommand(Command):
|
||||
|
||||
@@ -746,9 +746,8 @@ Webmail.prototype = {
|
||||
$("body").notify("success", gettext("Message sent"), 2000);
|
||||
}, this)).fail($.proxy(function(jqxhr) {
|
||||
var data = $.parseJSON(jqxhr.responseText);
|
||||
this.navobject.get_callback("compose")(data);
|
||||
if (data.respmsg != undefined) {
|
||||
$("body").notify("error", data.respmsg);
|
||||
if (data != undefined) {
|
||||
$("body").notify("error", data);
|
||||
}
|
||||
$("a[name=sendmail]").attr("disabled", null);
|
||||
}, this));
|
||||
|
||||
@@ -139,7 +139,7 @@ def raiseEvent(event, *args, **kwargs):
|
||||
|
||||
:param event: the event to raise
|
||||
"""
|
||||
if not event in events or not event in callbacks.keys():
|
||||
if not event in events or not event in callbacks:
|
||||
return 0
|
||||
for callback in callbacks[event].values():
|
||||
callback(*args, **kwargs)
|
||||
@@ -155,7 +155,7 @@ def raiseQueryEvent(event, *args, **kwargs):
|
||||
:param event: the event to raise
|
||||
"""
|
||||
result = []
|
||||
if not event in events or not event in callbacks.keys():
|
||||
if not event in events or not event in callbacks:
|
||||
return result
|
||||
for callback in callbacks[event].values():
|
||||
tmp = callback(*args, **kwargs)
|
||||
|
||||
+11
-7
@@ -6,9 +6,10 @@ This module contains extra functions/shortcuts used to render HTML.
|
||||
import sys
|
||||
import re
|
||||
import json
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.shortcuts import render, render_to_response
|
||||
from django.shortcuts import render
|
||||
from django.template.loader import render_to_string
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
@@ -140,9 +141,9 @@ def topredirection(request):
|
||||
"""Simple view to redirect the request when no application is specified.
|
||||
|
||||
The default "top redirection" can be specified in the *Admin >
|
||||
Settings* panel. It is the application that will be launched by
|
||||
default. Users that are not allowed to access this application
|
||||
will be redirected to the "User preferences" application.
|
||||
Settings* panel. It is the application that will be
|
||||
launched. Those not allowed to access the application will be
|
||||
redirected to their preferences page.
|
||||
|
||||
This feature only applies to simple users.
|
||||
|
||||
@@ -151,9 +152,12 @@ def topredirection(request):
|
||||
from modoboa.lib import parameters
|
||||
from modoboa.core.extensions import exts_pool
|
||||
|
||||
topredir = parameters.get_admin("DEFAULT_TOP_REDIRECTION", app="core")
|
||||
infos = exts_pool.get_extension_infos(topredir)
|
||||
path = infos["url"] if infos["url"] else infos["name"]
|
||||
if request.user.group == 'SimpleUsers':
|
||||
topredir = parameters.get_admin("DEFAULT_TOP_REDIRECTION", app="core")
|
||||
infos = exts_pool.get_extension_infos(topredir)
|
||||
path = infos["url"] if infos["url"] else infos["name"]
|
||||
else:
|
||||
path = reverse("domains")
|
||||
return HttpResponseRedirect(path)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user