mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
The top redirection feature will be applied only to simple users.
fixes #457
This commit is contained in:
@@ -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")
|
||||
)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user