1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-05 23:53:21 +00:00

Added option to let user control the paged param (#45)

This commit is contained in:
Kyle Spearrin
2020-05-19 12:16:30 -04:00
committed by GitHub
parent d94e5b0620
commit 059ff0647a
5 changed files with 16 additions and 1 deletions

View File

@@ -33,6 +33,14 @@
<label class="form-check-label" for="ad">{{'ldapAd' | i18n}}</label>
</div>
</div>
<div class="form-group" *ngIf="!ldap.ad">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="pagedSearch"
[(ngModel)]="ldap.pagedSearch" name="PagedSearch">
<label class="form-check-label"
for="pagedSearch">{{'ldapPagedResults' | i18n}}</label>
</div>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="ldapEncrypted" [(ngModel)]="ldap.ssl"

View File

@@ -84,6 +84,9 @@ export class SettingsComponent implements OnInit, OnDestroy {
async submit() {
ConnectorUtils.adjustConfigForSave(this.ldap, this.sync);
if (this.ldap != null && this.ldap.ad) {
this.ldap.pagedSearch = true;
}
await this.configurationService.saveOrganizationId(this.organizationId);
await this.configurationService.saveDirectoryType(this.directory);
await this.configurationService.saveDirectory(DirectoryType.Ldap, this.ldap);

View File

@@ -447,6 +447,9 @@
"ldapAd": {
"message": "This server uses Active Directory"
},
"ldapPagedResults": {
"message": "This server pages search results"
},
"select": {
"message": "Select"
},

View File

@@ -14,4 +14,5 @@ export class LdapConfiguration {
username: string;
password: string;
ad = true;
pagedSearch = true;
}

View File

@@ -293,7 +293,7 @@ export class LdapDirectoryService implements DirectoryService {
const options: ldap.SearchOptions = {
filter: filter,
scope: 'sub',
paged: false,
paged: this.dirConfig.pagedSearch,
};
const entries: T[] = [];
return new Promise<T[]>((resolve, reject) => {