1
1
import { Client , Change , Attribute } from "ldapts" ;
2
- import { prepareAttributesDefinitions , mergeAttributeDefinitions } from "pacc" ;
2
+ import {
3
+ prepareAttributesDefinitions ,
4
+ mergeAttributeDefinitions ,
5
+ url_attribute ,
6
+ default_attribute
7
+ } from "pacc" ;
3
8
import { Service } from "@kronos-integration/service" ;
4
9
import { expand } from "./util.mjs" ;
5
10
@@ -18,32 +23,26 @@ export class ServiceLDAP extends Service {
18
23
return "LDAP server access for bind/add/modify/del/query" ;
19
24
}
20
25
21
- static get configurationAttributes ( ) {
22
- return mergeAttributeDefinitions (
23
- prepareAttributesDefinitions ( {
24
- url : {
25
- needsRestart : true ,
26
- mandatory : true ,
27
- type : "url"
28
- } ,
29
- entitlements : {
30
- description : "attributes to build a entitlement query" ,
31
- attributes : {
32
- bindDN : {
33
- type : "string"
34
- } ,
35
- base : {
36
- type : "string"
37
- } ,
38
- attribute : { default : "cn" , type : "string" } ,
39
- scope : { default : "sub" , type : "string" } ,
40
- filter : { type : "string" }
41
- }
26
+ static attributes = mergeAttributeDefinitions (
27
+ prepareAttributesDefinitions ( {
28
+ url : {
29
+ ...url_attribute ,
30
+ needsRestart : true ,
31
+ mandatory : true
32
+ } ,
33
+ entitlements : {
34
+ description : "attributes to build a entitlement query" ,
35
+ attributes : {
36
+ bindDN : default_attribute ,
37
+ base : default_attribute ,
38
+ attribute : { ...default_attribute , default : "cn" } ,
39
+ scope : { ...default_attribute , default : "sub" } ,
40
+ filter : default_attribute
42
41
}
43
- } ) ,
44
- Service . configurationAttributes
45
- ) ;
46
- }
42
+ }
43
+ } ) ,
44
+ Service . attributes
45
+ ) ;
47
46
48
47
static get endpoints ( ) {
49
48
return {
0 commit comments