From 4ac4106f8b9167648de3d78a72a0126d65a500e4 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Thu, 1 Aug 2013 17:07:55 +0200 Subject: [PATCH] The top redirection feature will be applied only to simple users. fixes #457 --- modoboa/admin/app_settings.py | 4 ++-- modoboa/auth/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modoboa/admin/app_settings.py b/modoboa/admin/app_settings.py index b9743912b..1f02db899 100644 --- a/modoboa/admin/app_settings.py +++ b/modoboa/admin/app_settings.py @@ -18,7 +18,7 @@ def enabled_applications(): from modoboa.admin.models import Extension from modoboa.lib.dbutils import db_table_exists - result = [("admin", "admin"), ("userprefs", "userprefs")] + result = [("userprefs", "userprefs")] if db_table_exists("admin_extension"): exts = Extension.objects.filter(enabled=True) result += [(ext.name, ext.name) for ext in exts] @@ -171,7 +171,7 @@ class GeneralParametersForm(parameters.AdminParametersForm): default_top_redirection = forms.ChoiceField( label=ugettext_lazy("Default top redirection"), choices=[], - initial="admin", + initial="userprefs", help_text=ugettext_lazy("The default redirection used when no application is specified") ) diff --git a/modoboa/auth/views.py b/modoboa/auth/views.py index d8464e496..9589e3414 100755 --- a/modoboa/auth/views.py +++ b/modoboa/auth/views.py @@ -36,7 +36,7 @@ def dologin(request): nextlocation = request.POST.get("next", None) if nextlocation is None or nextlocation == "None": - if user.group != "SimpleUsers": + if user.group == "SimpleUsers": nextlocation = reverse("modoboa.lib.webutils.topredirection") else: nextlocation = reverse("domains")