mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 15:53:23 +02:00
Add ldap username field option. Default field is 'cn'
This commit is contained in:
@@ -360,6 +360,10 @@ program
|
||||
, 'LDAP search field (or $LDAP_SEARCH_FIELD)'
|
||||
, String
|
||||
, process.env.LDAP_SEARCH_FIELD)
|
||||
.option('--ldap-username-field <scope>'
|
||||
, 'LDAP username field (or $LDAP_USERNAME_FIELD)'
|
||||
, String
|
||||
, process.env.LDAP_USERNAME_FIELD || 'cn')
|
||||
.action(function(options) {
|
||||
if (!options.secret) {
|
||||
this.missingArgument('--secret')
|
||||
@@ -386,6 +390,9 @@ program
|
||||
, objectClass: options.ldapSearchClass
|
||||
, field: options.ldapSearchField
|
||||
}
|
||||
, username: {
|
||||
field: options.ldapUsernameField
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user