feat: add ldap login support (#5706)
* feat: add ldap login support * fix: ldap permission config group
This commit is contained in:
@ -165,6 +165,17 @@ func InitialSettings() []model.SettingItem {
|
||||
{Key: conf.SSODefaultDir, Value: "/", Type: conf.TypeString, Group: model.SSO, Flag: model.PRIVATE},
|
||||
{Key: conf.SSODefaultPermission, Value: "0", Type: conf.TypeNumber, Group: model.SSO, Flag: model.PRIVATE},
|
||||
{Key: conf.SSOCompatibilityMode, Value: "false", Type: conf.TypeBool, Group: model.SSO, Flag: model.PUBLIC},
|
||||
|
||||
// ldap settings
|
||||
{Key: conf.LdapLoginEnabled, Value: "false", Type: conf.TypeBool, Group: model.LDAP, Flag: model.PUBLIC},
|
||||
{Key: conf.LdapServer, Value: "", Type: conf.TypeString, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapManagerDN, Value: "", Type: conf.TypeString, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapManagerPassword, Value: "", Type: conf.TypeString, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapUserSearchBase, Value: "", Type: conf.TypeString, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapUserSearchFilter, Value: "(uid=%s)", Type: conf.TypeString, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapDefaultDir, Value: "/", Type: conf.TypeString, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapDefaultPermission, Value: "0", Type: conf.TypeNumber, Group: model.LDAP, Flag: model.PRIVATE},
|
||||
{Key: conf.LdapLoginTips, Value: "login with ldap", Type: conf.TypeString, Group: model.LDAP, Flag: model.PUBLIC},
|
||||
}
|
||||
initialSettingItems = append(initialSettingItems, tool.Tools.Items()...)
|
||||
if flags.Dev {
|
||||
|
@ -73,6 +73,17 @@ const (
|
||||
SSODefaultPermission = "sso_default_permission"
|
||||
SSOCompatibilityMode = "sso_compatibility_mode"
|
||||
|
||||
//ldap
|
||||
LdapLoginEnabled = "ldap_login_enabled"
|
||||
LdapServer = "ldap_server"
|
||||
LdapManagerDN = "ldap_manager_dn"
|
||||
LdapManagerPassword = "ldap_manager_password"
|
||||
LdapUserSearchBase = "ldap_user_search_base"
|
||||
LdapUserSearchFilter = "ldap_user_search_filter"
|
||||
LdapDefaultPermission = "ldap_default_permission"
|
||||
LdapDefaultDir = "ldap_default_dir"
|
||||
LdapLoginTips = "ldap_login_tips"
|
||||
|
||||
// qbittorrent
|
||||
QbittorrentUrl = "qbittorrent_url"
|
||||
QbittorrentSeedtime = "qbittorrent_seedtime"
|
||||
|
@ -9,6 +9,7 @@ const (
|
||||
OFFLINE_DOWNLOAD
|
||||
INDEX
|
||||
SSO
|
||||
LDAP
|
||||
)
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user