The top redirection feature will be applied only to simple users.

fixes #457
This commit is contained in:
Antoine Nguyen
2013-08-01 17:07:55 +02:00
parent 315b13baf0
commit 4ac4106f8b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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")
)
+1 -1
View File
@@ -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")