ldap-rest 0.22.1 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/config/schema.d.ts +9 -0
- package/docs/usage/plugins/ldap/flat-generic.md +25 -0
- package/package.json +1 -1
- package/static/schemas/ad/users.json +4 -2
- package/static/schemas/example/users.json +2 -0
- package/static/schemas/obm/users.json +4 -2
- package/static/schemas/standard/users.json +4 -2
- package/static/schemas/twake/users.json +21 -12
|
@@ -32,6 +32,9 @@ export type SchemaAttributeType = 'string' | 'number' | 'integer' | 'boolean' |
|
|
|
32
32
|
* | `accountExpiry` | Date after which the account is to be removed |
|
|
33
33
|
* | `domainLink` | DNs of the mail domains an organization may use |
|
|
34
34
|
* | `domainName` | Domain name carried by a domain entry |
|
|
35
|
+
*
|
|
36
|
+
* Clients look for more: `givenName` and `surname` name the parts of a
|
|
37
|
+
* person's name, which a form composes the `displayName` from.
|
|
35
38
|
*/
|
|
36
39
|
export type SchemaRole = string;
|
|
37
40
|
/**
|
|
@@ -150,6 +153,12 @@ export interface SchemaAttribute {
|
|
|
150
153
|
* client never has to hardcode either.
|
|
151
154
|
*/
|
|
152
155
|
hint?: LocalizedText;
|
|
156
|
+
/**
|
|
157
|
+
* What the attribute is, for a client to show on demand — a tooltip next to
|
|
158
|
+
* the label — where its label alone does not say: "Employee ID" names a
|
|
159
|
+
* number, not whose records hold it.
|
|
160
|
+
*/
|
|
161
|
+
help?: LocalizedText;
|
|
153
162
|
branch?: string[];
|
|
154
163
|
fixed?: boolean;
|
|
155
164
|
/** Semantic role(s) — see {@link SchemaRole} */
|
|
@@ -222,6 +222,27 @@ cannot drift apart, and neither is hardcoded in the interface. A translated
|
|
|
222
222
|
hint is picked like a label; the server's messages are in English, so it
|
|
223
223
|
quotes the English text.
|
|
224
224
|
|
|
225
|
+
### Explaining an attribute: `help`
|
|
226
|
+
|
|
227
|
+
A label names an attribute; it does not always say what it is. `help` does,
|
|
228
|
+
for a client to show on demand — a tooltip next to the label — rather than
|
|
229
|
+
under every field:
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"employeeNumber": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"label": { "en": "Employee ID", "fr": "Matricule" },
|
|
236
|
+
"help": {
|
|
237
|
+
"en": "The person's registration number, as the personnel records hold it.",
|
|
238
|
+
"fr": "Le matricule de la personne, tel que le tient la gestion du personnel."
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
It is picked like a label. The server never shows it.
|
|
245
|
+
|
|
225
246
|
### Attributes a client may not send
|
|
226
247
|
|
|
227
248
|
| Marker | Meaning |
|
|
@@ -303,6 +324,10 @@ chose in its own. The roles the core looks for:
|
|
|
303
324
|
An attribute may carry several roles (`"role": ["identifier", "displayName"]`),
|
|
304
325
|
and a deployment is free to add its own for its plugins.
|
|
305
326
|
|
|
327
|
+
Clients look for more: `givenName` and `surname` name the parts of a person's
|
|
328
|
+
name, which a form composes the `displayName` from. The shipped user schemas
|
|
329
|
+
mark `givenName` and `sn` with them.
|
|
330
|
+
|
|
306
331
|
### Which attributes a search covers: `searchable`
|
|
307
332
|
|
|
308
333
|
`GET /{pluralName}?match=…&attribute=…` takes one attribute name or several
|
package/package.json
CHANGED
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"sn": {
|
|
39
39
|
"type": "string",
|
|
40
|
-
"required": true
|
|
40
|
+
"required": true,
|
|
41
|
+
"role": "surname"
|
|
41
42
|
},
|
|
42
43
|
"givenName": {
|
|
43
44
|
"type": "string",
|
|
44
|
-
"required": false
|
|
45
|
+
"required": false,
|
|
46
|
+
"role": "givenName"
|
|
45
47
|
},
|
|
46
48
|
"displayName": {
|
|
47
49
|
"type": "string",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"test": "^[A-ZÀ-ÖØ-Þ](?!.*([\\s’'-]{2}|[.’'-]{2}|\\s\\.|[\\s’'-]$))[A-Za-zÀ-ÖØ-öø-ÿ\\s’'.-]{1,50}$",
|
|
58
58
|
"hint": "Starts with a capital, up to 51 letters, no repeated space, apostrophe, hyphen or dot",
|
|
59
59
|
"required": true,
|
|
60
|
+
"role": "surname",
|
|
60
61
|
"label": "Last name"
|
|
61
62
|
},
|
|
62
63
|
"givenName": {
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"test": "^[A-ZÀ-ÖØ-Þ](?!.*([\\s’'-]{2}|[.’'-]{2}|\\s\\.|[\\s’'-]$))[A-Za-zÀ-ÖØ-öø-ÿ\\s’'.-]{1,50}$",
|
|
66
67
|
"hint": "Starts with a capital, up to 51 letters, no repeated space, apostrophe, hyphen or dot",
|
|
67
68
|
"required": true,
|
|
69
|
+
"role": "givenName",
|
|
68
70
|
"label": "First name"
|
|
69
71
|
},
|
|
70
72
|
"displayName": {
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"sn": {
|
|
55
55
|
"type": "string",
|
|
56
|
-
"required": true
|
|
56
|
+
"required": true,
|
|
57
|
+
"role": "surname"
|
|
57
58
|
},
|
|
58
59
|
"homeDirectory": {
|
|
59
60
|
"type": "string",
|
|
@@ -76,7 +77,8 @@
|
|
|
76
77
|
},
|
|
77
78
|
"givenName": {
|
|
78
79
|
"type": "string",
|
|
79
|
-
"required": true
|
|
80
|
+
"required": true,
|
|
81
|
+
"role": "givenName"
|
|
80
82
|
},
|
|
81
83
|
"displayName": {
|
|
82
84
|
"type": "string",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"sn": {
|
|
33
33
|
"type": "string",
|
|
34
|
-
"required": true
|
|
34
|
+
"required": true,
|
|
35
|
+
"role": "surname"
|
|
35
36
|
},
|
|
36
37
|
"mail": {
|
|
37
38
|
"type": "string",
|
|
@@ -55,7 +56,8 @@
|
|
|
55
56
|
},
|
|
56
57
|
"givenName": {
|
|
57
58
|
"type": "string",
|
|
58
|
-
"required": false
|
|
59
|
+
"required": false,
|
|
60
|
+
"role": "givenName"
|
|
59
61
|
},
|
|
60
62
|
"displayName": {
|
|
61
63
|
"type": "string",
|
|
@@ -53,12 +53,30 @@
|
|
|
53
53
|
"type": "string",
|
|
54
54
|
"searchable": true,
|
|
55
55
|
"required": true,
|
|
56
|
-
"unique": {
|
|
56
|
+
"unique": {
|
|
57
|
+
"sentinel": "UNIT"
|
|
58
|
+
},
|
|
57
59
|
"role": "employeeId",
|
|
58
60
|
"label": {
|
|
59
61
|
"en": "Employee ID",
|
|
60
62
|
"fr": "Matricule",
|
|
61
63
|
"mn": "Ажилтны дугаар"
|
|
64
|
+
},
|
|
65
|
+
"help": {
|
|
66
|
+
"en": "The person's registration number, as the personnel records hold it. Unique in the directory, except UNIT, which the accounts of no one in particular (shared, technical) take.",
|
|
67
|
+
"fr": "Le matricule de la personne, tel que le tient la gestion du personnel. Unique dans l'annuaire, sauf UNIT, que prennent les comptes qui ne sont à personne en particulier (partagés, techniques).",
|
|
68
|
+
"mn": "Хүний нөөцийн бүртгэлд байгаа ажилтны дугаар. Лавлахад давхцахгүй байх ёстой; хэн нэгэн хүнд хамааралгүй (дундын, техникийн) бүртгэлүүд UNIT утгыг авна."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"twakeDepartmentLink": {
|
|
72
|
+
"type": "pointer",
|
|
73
|
+
"branch": ["__LDAP_BASE__"],
|
|
74
|
+
"required": true,
|
|
75
|
+
"role": "organizationLink",
|
|
76
|
+
"label": {
|
|
77
|
+
"en": "Department",
|
|
78
|
+
"fr": "Organisation",
|
|
79
|
+
"mn": "Байгууллага"
|
|
62
80
|
}
|
|
63
81
|
},
|
|
64
82
|
"cn": {
|
|
@@ -75,6 +93,7 @@
|
|
|
75
93
|
"type": "string",
|
|
76
94
|
"searchable": true,
|
|
77
95
|
"required": true,
|
|
96
|
+
"role": "surname",
|
|
78
97
|
"label": {
|
|
79
98
|
"en": "Last name",
|
|
80
99
|
"fr": "Nom de famille",
|
|
@@ -85,6 +104,7 @@
|
|
|
85
104
|
"type": "string",
|
|
86
105
|
"searchable": true,
|
|
87
106
|
"required": true,
|
|
107
|
+
"role": "givenName",
|
|
88
108
|
"label": {
|
|
89
109
|
"en": "First name",
|
|
90
110
|
"fr": "Prénom",
|
|
@@ -289,17 +309,6 @@
|
|
|
289
309
|
"mn": "Нууц үгээ солих шаардлагатай"
|
|
290
310
|
}
|
|
291
311
|
},
|
|
292
|
-
"twakeDepartmentLink": {
|
|
293
|
-
"type": "pointer",
|
|
294
|
-
"branch": ["__LDAP_BASE__"],
|
|
295
|
-
"required": true,
|
|
296
|
-
"role": "organizationLink",
|
|
297
|
-
"label": {
|
|
298
|
-
"en": "Department",
|
|
299
|
-
"fr": "Organisation",
|
|
300
|
-
"mn": "Байгууллага"
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
312
|
"twakeDepartmentPath": {
|
|
304
313
|
"type": "string",
|
|
305
314
|
"test": "^[^\\r\\n]{1,4096}$",
|