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

models for entries

This commit is contained in:
Kyle Spearrin
2018-04-27 22:53:46 -04:00
parent e8351c3246
commit 39f760e135
5 changed files with 29 additions and 9 deletions

6
src/models/entry.ts Normal file
View File

@@ -0,0 +1,6 @@
export abstract class Entry {
referenceId: string;
externalId: string;
creationDate: Date;
revisonDate: Date;
}

7
src/models/groupEntry.ts Normal file
View File

@@ -0,0 +1,7 @@
import { Entry } from './entry';
export class GroupEntry extends Entry {
name: string;
userMemberExternalIds = new Set<string>();
groupMemberReferenceIds = new Set<string>();
}

View File

@@ -1,13 +1,13 @@
import { DirectoryType } from '../enums/directoryType';
export class LdapConfiguration {
ssl: boolean = false;
ssl = false;
hostname: string;
port: number = 389;
port = 389;
domain: string;
rootPath: string;
currentUser: boolean = false;
currentUser = false;
username: string;
password: string;
ad: boolean = true;
ad = true;
}

View File

@@ -1,10 +1,10 @@
export class SyncConfiguration {
users: boolean = false;
groups: boolean = false;
interval: number = 5;
users = false;
groups = false;
interval = 5;
userFilter: string;
groupFilter: string;
removeDisabled: boolean = false;
removeDisabled = false;
// Ldap properties
groupObjectClass: string;
userObjectClass: string;
@@ -13,7 +13,7 @@ export class SyncConfiguration {
groupNameAttribute: string;
userEmailAttribute: string;
memberAttribute: string;
useEmailPrefixSuffix: boolean = false;
useEmailPrefixSuffix = false;
emailPrefixAttribute: string;
emailSuffix: string;
creationDateAttribute: string;

7
src/models/userEntry.ts Normal file
View File

@@ -0,0 +1,7 @@
import { Entry } from './entry';
export class UserEntry extends Entry {
email: string;
disabled = false;
deleted = false;
}