mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-23 13:37:31 +00:00
[Update] 启用ldap移动位置
This commit is contained in:
parent
a77acb7dfb
commit
d08a1c3ddb
@ -72,9 +72,6 @@ class BasicSettingForm(BaseForm):
|
||||
max_length=1024, label=_("Email Subject Prefix"),
|
||||
initial="[Jumpserver] "
|
||||
)
|
||||
AUTH_LDAP = forms.BooleanField(
|
||||
label=_("Enable LDAP Auth"), initial=False, required=False
|
||||
)
|
||||
|
||||
|
||||
class EmailSettingForm(BaseForm):
|
||||
@ -129,3 +126,6 @@ class LDAPSettingForm(BaseForm):
|
||||
AUTH_LDAP_START_TLS = forms.BooleanField(
|
||||
label=_("Use SSL"), initial=False, required=False
|
||||
)
|
||||
AUTH_LDAP = forms.BooleanField(
|
||||
label=_("Enable LDAP Auth"), initial=False, required=False
|
||||
)
|
||||
|
@ -25,8 +25,6 @@ class BasicSettingView(AdminUserRequiredMixin, TemplateView):
|
||||
form = self.form_class(request.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
if "AUTH_LDAP" in form.cleaned_data:
|
||||
ldap_auth_enable.send(form.cleaned_data["AUTH_LDAP"])
|
||||
msg = _("Update setting successfully, please restart program")
|
||||
messages.success(request, msg)
|
||||
return redirect('settings:basic-setting')
|
||||
@ -79,6 +77,8 @@ class LDAPSettingView(AdminUserRequiredMixin, TemplateView):
|
||||
form = self.form_class(request.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
if "AUTH_LDAP" in form.cleaned_data:
|
||||
ldap_auth_enable.send(form.cleaned_data["AUTH_LDAP"])
|
||||
msg = _("Update setting successfully, please restart program")
|
||||
messages.success(request, msg)
|
||||
return redirect('settings:ldap-setting')
|
||||
|
Binary file not shown.
@ -1311,7 +1311,7 @@ msgstr "Email主题前缀"
|
||||
|
||||
#: common/forms.py:76
|
||||
msgid "Enable LDAP Auth"
|
||||
msgstr "LDAP认证"
|
||||
msgstr "开启LDAP认证"
|
||||
|
||||
#: common/forms.py:82
|
||||
msgid "SMTP host"
|
||||
|
Loading…
Reference in New Issue
Block a user