Merge pull request #3974 from stonezdj/ldap_ping_timeout

Setting timeout for ldap ping
This commit is contained in:
stone 2018-01-12 11:22:27 +08:00 committed by GitHub
commit ec173305a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -21,9 +21,9 @@ const (
UAAAuth = "uaa_auth"
ProCrtRestrEveryone = "everyone"
ProCrtRestrAdmOnly = "adminonly"
LDAPScopeBase = 1
LDAPScopeOnelevel = 2
LDAPScopeSubtree = 3
LDAPScopeBase = 0
LDAPScopeOnelevel = 1
LDAPScopeSubtree = 2
RoleProjectAdmin = 1
RoleDeveloper = 2

View File

@ -51,7 +51,9 @@ func (l *LdapAPI) Prepare() {
// Ping ...
func (l *LdapAPI) Ping() {
var ldapConfs models.LdapConf
var ldapConfs = models.LdapConf{
LdapConnectionTimeout: 5,
}
var err error
var ldapSession *ldapUtils.Session