mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
parse HMD_LDAP_SEARCHATTRIBUTES env var as a comma-separated array
Signed-off-by: Alec WM <firstcontact@owls.io>
This commit is contained in:
parent
e9e7a8e23d
commit
5e5a021ce0
4 changed files with 14 additions and 7 deletions
|
@ -6,3 +6,10 @@ exports.toBooleanConfig = function toBooleanConfig (configValue) {
|
|||
}
|
||||
return configValue
|
||||
}
|
||||
|
||||
exports.toArrayConfig = function toArrayConfig (configValue, separator = ',', fallback) {
|
||||
if (configValue && typeof configValue === 'string') {
|
||||
return (configValue.split(separator).map(arrayItem => arrayItem.trim()))
|
||||
}
|
||||
return fallback
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue