mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-11 13:53:22 +00:00
if no dc= in rootPath, just return pathPrefix
This commit is contained in:
@@ -231,6 +231,9 @@ export class LdapDirectoryService implements DirectoryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private makeSearchPath(pathPrefix: string) {
|
private makeSearchPath(pathPrefix: string) {
|
||||||
|
if (this.dirConfig.rootPath.indexOf('dc=') === -1) {
|
||||||
|
return pathPrefix;
|
||||||
|
}
|
||||||
if (this.dirConfig.rootPath != null && this.dirConfig.rootPath.trim() !== '') {
|
if (this.dirConfig.rootPath != null && this.dirConfig.rootPath.trim() !== '') {
|
||||||
const trimmedRootPath = this.dirConfig.rootPath.trim().toLowerCase();
|
const trimmedRootPath = this.dirConfig.rootPath.trim().toLowerCase();
|
||||||
let path = trimmedRootPath.substr(trimmedRootPath.indexOf('dc='));
|
let path = trimmedRootPath.substr(trimmedRootPath.indexOf('dc='));
|
||||||
|
|||||||
Reference in New Issue
Block a user