Skip to content

Commit

Permalink
fix: ExtensibleMatch bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeid Ostad committed Dec 28, 2020
1 parent 4d4b037 commit e71c63b
Show file tree
Hide file tree
Showing 15 changed files with 1,946 additions and 5,625 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"no-async-promise-executor": 1,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/indent": 0,
"no-console": "warn"
"no-console": "warn",
"@typescript-eslint/explicit-module-boundary-types": 0
}
}
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ const { query } = qGen
matchingRuleId: "1.2.840.113556.1.4.1941",
},
})
.whereNot({
field: "userAccountControl",
action: "extensible",
criteria: "2",
extensibleConfig: {
dn: false,
ignoreField: false,
matchingRuleId: "1.2.840.113556.1.4.803",
},
})
.whereRaw("&(cn=3)(dn=*)")
.whereRaw("phone=*11");

Expand All @@ -50,16 +60,16 @@ console.log(query.toString());
Output:

```
(&(mobile=404*999*)(&(memberOf=admin*)(memberOf=*office)(badPwdCount<=2)(info~=my-info))(|(mail=*)(homePostalAddress=Georgia))(!(delivContLength>=6)(:dn:1.2.840.113556.1.4.1941:=joe))(&(cn=3)(dn=*))(phone=*11))
(&(mobile=404*999*)(&(memberOf=admin*))(&(memberOf=*office))(&(badPwdCount<=2))(&(info~=my-info))(|(mail=*))(|(homePostalAddress=Georgia))(!(delivContLength>=6))(!(:dn:1.2.840.113556.1.4.1941:=joe))(!(userAccountControl:1.2.840.113556.1.4.803:=2))(&(cn=3)(dn=*))(phone=*11))
```

### Note:

to auto-generate interface types from schema use [ldap-schema-ts-generator](https://www.npmjs.com/package/ldap-schema-ts-generator)
to generate interfaces from ldap schema, use [ldap-schema-ts-generator](https://www.npmjs.com/package/ldap-schema-ts-generator)

### Api Documentations

for full API documentation look at [API Website](https://saostad.github.io/ldap-query-generator/modules/_index_.html)
API documentation [API Website](https://saostad.github.io/ldap-query-generator/modules/_index_.html)

## TODO

Expand Down
Loading

0 comments on commit e71c63b

Please sign in to comment.