Teamcity - 将 ldap 属性组合成 ldap-config.properties 中的一行

Teamcity - Combine ldap properties into a single line in ldap-config.properties

我有一个连接到 LDAP 服务器 (AD) 的 teamcity 实例,我需要将我的 VCS 用户名配置为以下格式:

firstname.surname

我知道我需要修改 ldap-config.properties 文件中的以下配置条目才能执行此操作

teamcity.users.property.plugin:vcs:anyVcs:anyVcsRoot

我知道我需要使用以下两个 ldap 属性:givenName、sn。

但是,我很难理解在配置中执行此操作的语法。我尝试了不同的组合,虽然这些属性可以独立工作,但我找不到将它们连接在一起的方法。即使是下面的(错过了中间的句号)也不起作用

(&(givenName)(sn))

修复是使用以下语法:

%ldap.userEntry.%

(根据 ldap-config.properties.dist 文件中的第 160 - 161 行)

所以对于我的例子,我想要名字,然后是句号,然后是姓氏,我的整个配置行如下:

teamcity.users.property.plugin\:vcs\:anyVcs\:anyVcsRoot=%ldap.userEntry.givenName%.%ldap.userEntry.sn%