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:
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -447,6 +447,9 @@
|
||||
"ldapAd": {
|
||||
"message": "This server uses Active Directory"
|
||||
},
|
||||
"ldapPagedResults": {
|
||||
"message": "This server pages search results"
|
||||
},
|
||||
"select": {
|
||||
"message": "Select"
|
||||
},
|
||||
|
||||
@@ -14,4 +14,5 @@ export class LdapConfiguration {
|
||||
username: string;
|
||||
password: string;
|
||||
ad = true;
|
||||
pagedSearch = true;
|
||||
}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user