ldap-rest 0.17.1 → 0.19.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.
Files changed (73) hide show
  1. package/dist/abstract/ldapFlat.js +1 -1
  2. package/dist/abstract/twakePlugin.js +1 -1
  3. package/dist/config/args.js +1 -1
  4. package/dist/config/schema.js +1 -1
  5. package/dist/lib/ldapActions.js +1 -1
  6. package/dist/plugins/ldap/enterpriseRules.js +1 -1
  7. package/dist/plugins/ldap/externalUsersInGroups.js +1 -1
  8. package/dist/plugins/ldap/groups.js +1 -1
  9. package/dist/plugins/ldap/organizations.js +1 -1
  10. package/dist/plugins/twake/james.js +1 -1
  11. package/dist/src/abstract/ldapFlat.d.ts +9 -11
  12. package/dist/src/browser/ldap-group-editor/types.d.ts +2 -1
  13. package/dist/src/browser/ldap-resource-editor/types.d.ts +3 -2
  14. package/dist/src/browser/ldap-unit-editor/types.d.ts +2 -1
  15. package/dist/src/browser/ldap-user-editor/types.d.ts +3 -2
  16. package/dist/src/browser/shared/types/index.d.ts +7 -1
  17. package/dist/src/browser/shared/utils/schema.d.ts +20 -1
  18. package/dist/src/config/args.d.ts +1 -0
  19. package/dist/src/config/schema.d.ts +27 -4
  20. package/dist/src/plugins/ldap/externalUsersInGroups.d.ts +11 -0
  21. package/dist/src/plugins/ldap/organizations.d.ts +0 -8
  22. package/dist/src/plugins/twake/james.d.ts +63 -75
  23. package/docs/client-development/api/reference.md +1 -1
  24. package/docs/client-development/api/rest-api.md +13 -1
  25. package/docs/client-development/schemas/README.md +18 -13
  26. package/docs/plugin-development/dependencies.md +1 -3
  27. package/docs/presentations/en.md +0 -28
  28. package/docs/presentations/fr.md +0 -28
  29. package/docs/usage/configuration.md +13 -12
  30. package/docs/usage/plugins/integrations/james-mail.md +92 -129
  31. package/docs/usage/plugins/integrations/james-mailboxes.md +70 -83
  32. package/docs/usage/plugins/ldap/external-users.md +23 -2
  33. package/docs/usage/plugins/ldap/flat-generic.md +23 -5
  34. package/docs/usage/plugins/utilities/weblogs.md +1 -1
  35. package/docs/usage/upgrading.md +48 -0
  36. package/package.json +1 -1
  37. package/static/browser/ldap-resource-editor/api/ResourceApiClient.js +2 -1
  38. package/static/browser/ldap-resource-editor/api/ResourceApiClient.js.map +1 -1
  39. package/static/browser/ldap-user-editor/api/UserApiClient.js +2 -1
  40. package/static/browser/ldap-user-editor/api/UserApiClient.js.map +1 -1
  41. package/static/browser/ldap-user-editor/components/UserEditor.js +11 -8
  42. package/static/browser/ldap-user-editor/components/UserEditor.js.map +1 -1
  43. package/static/browser/ldap-user-editor/components/UserList.js +3 -1
  44. package/static/browser/ldap-user-editor/components/UserList.js.map +1 -1
  45. package/static/browser/ldap-user-editor.esm.js +52 -10
  46. package/static/browser/ldap-user-editor.esm.js.map +1 -1
  47. package/static/browser/ldap-user-editor.js +52 -10
  48. package/static/browser/ldap-user-editor.js.map +1 -1
  49. package/static/browser/ldap-user-editor.min.js +1 -1
  50. package/static/browser/ldap-user-editor.min.js.map +1 -1
  51. package/static/browser/shared/index.js +1 -1
  52. package/static/browser/shared/types/index.js.map +1 -1
  53. package/static/browser/shared/utils/form.js +2 -1
  54. package/static/browser/shared/utils/form.js.map +1 -1
  55. package/static/browser/shared/utils/schema.js +33 -1
  56. package/static/browser/shared/utils/schema.js.map +1 -1
  57. package/static/browser/shared.esm.js +153 -121
  58. package/static/browser/shared.esm.js.map +1 -1
  59. package/static/browser/shared.js +154 -120
  60. package/static/browser/shared.js.map +1 -1
  61. package/static/browser/shared.min.js +1 -1
  62. package/static/browser/shared.min.js.map +1 -1
  63. package/static/schemas/standard/groups.json +1 -1
  64. package/static/schemas/twake/groups.json +53 -18
  65. package/static/schemas/twake/nomenclature/twakeAccountStatus.json +24 -8
  66. package/static/schemas/twake/nomenclature/twakeDeliveryMode.json +22 -7
  67. package/static/schemas/twake/nomenclature/twakeDomain.json +21 -8
  68. package/static/schemas/twake/nomenclature/twakeListType.json +22 -7
  69. package/static/schemas/twake/nomenclature/twakeMailboxType.json +22 -7
  70. package/static/schemas/twake/nomenclature/twakeTitle.json +32 -12
  71. package/static/schemas/twake/organizations.json +29 -13
  72. package/static/schemas/twake/positions.json +13 -5
  73. package/static/schemas/twake/users.json +103 -38
@@ -1,13 +1,13 @@
1
1
  # James Team Mailboxes
2
2
 
3
- This feature adds support for James/TMail team mailboxes in addition to existing mailing lists. Team mailboxes are shared mailboxes with IMAP access, as opposed to mailing lists which only distribute emails to members.
3
+ `twake/james` creates James/TMail team mailboxes from LDAP groups. Team mailboxes are shared mailboxes with IMAP access, as opposed to mailing lists which only distribute emails to members, and which `twake/james` leaves to Twake Mail: see [Mailing lists](#mailing-lists).
4
4
 
5
5
  ## Overview
6
6
 
7
7
  Groups in LDAP can now have three different mailbox types:
8
8
 
9
9
  - **group**: Simple group without mail functionality (default if no mail attribute)
10
- - **mailingList**: Traditional mailing list (email redistribution via James `/address/groups/` API)
10
+ - **mailingList**: Mailing list, read from LDAP by Twake Mail; nothing is created in James
11
11
  - **teamMailbox**: Shared team mailbox (shared IMAP mailbox via James `/domains/{domain}/team-mailboxes/` API)
12
12
 
13
13
  ## Configuration
@@ -46,7 +46,7 @@ This creates three nomenclature entries:
46
46
  Add to your ldap-rest configuration:
47
47
 
48
48
  ```bash
49
- # Optional: Restrict mailing lists to specific branches
49
+ # Optional: branches holding mailing lists, where team mailboxes are refused
50
50
  --james-mailing-list-branches "ou=lists,dc=example,dc=com"
51
51
 
52
52
  # Optional: Custom mailbox type attribute (default: twakeMailboxType)
@@ -60,7 +60,20 @@ DM_JAMES_MAILING_LIST_BRANCHES="ou=lists,dc=example,dc=com"
60
60
  DM_JAMES_MAILBOX_TYPE_ATTRIBUTE="mailboxType"
61
61
  ```
62
62
 
63
- If `james-mailing-list-branches` is empty (default), mailing lists can be created anywhere.
63
+ If `james-mailing-list-branches` is empty (default), team mailboxes can be created anywhere.
64
+
65
+ ## Mailing lists
66
+
67
+ `twake/james` creates nothing in James for a mailing list: a group with a
68
+ `mail` whose `twakeMailboxType` is `mailingList`, or is not set. Twake Mail
69
+ reads the list from LDAP when a mail reaches it, with its `LDAPMailingList`
70
+ mailet: a member change applies at once, and the list type held in
71
+ `businessCategory` (open, members only, owners only…) decides who may write
72
+ to it.
73
+
74
+ James address groups (`/address/groups`) are not used: they cannot restrict
75
+ senders, so anyone, external senders included, could write through one to a
76
+ members-only list.
64
77
 
65
78
  ## Usage
66
79
 
@@ -84,8 +97,8 @@ await dm.ldap.add('cn=sales-team,ou=groups,dc=example,dc=com', {
84
97
 
85
98
  This will:
86
99
 
87
- 1. Create the team mailbox via `PUT /domains/example.com/team-mailboxes/sales@example.com`
88
- 2. Add each member via `PUT /domains/example.com/team-mailboxes/sales@example.com/members/{member-email}`
100
+ 1. Create the team mailbox via `PUT /domains/example.com/team-mailboxes/sales`
101
+ 2. Add each member via `PUT /domains/example.com/team-mailboxes/sales/members/{member-email}`
89
102
 
90
103
  ### Creating a Mailing List
91
104
 
@@ -105,10 +118,7 @@ await dm.ldap.add('cn=announce,ou=lists,dc=example,dc=com', {
105
118
  });
106
119
  ```
107
120
 
108
- This will:
109
-
110
- 1. Validate the group is in an allowed branch (if `--james-mailing-list-branches` is configured)
111
- 2. Create the mailing list via `PUT /address/groups/announce@example.com/{member-email}` for each member
121
+ Nothing is sent to James: Twake Mail reads the list from LDAP.
112
122
 
113
123
  ### Creating a Simple Group (no mailbox)
114
124
 
@@ -126,36 +136,47 @@ await dm.ldap.add('cn=developers,ou=groups,dc=example,dc=com', {
126
136
 
127
137
  This creates a simple group without any James integration (no mail attribute, no mailbox).
128
138
 
139
+ ## Following the group
140
+
141
+ `twake/james` compares a team mailbox group before and after each write made
142
+ through LDAP-Rest, whatever made it: the groups API, its `/members` routes,
143
+ or any other write to the entry.
144
+
145
+ - A member added or removed is added to or removed from the mailbox.
146
+ - A group created as a team mailbox, or that becomes one, gets the mailbox
147
+ created with all its members.
148
+ - A group that stops being one (another type, no `mail`, moved into a mailing
149
+ list branch, or deleted) leaves its mailbox in James with no member. The
150
+ mailbox is never deleted: it may hold mail.
151
+ - A new `mail` empties the mailbox of the old address and creates the one of
152
+ the new address.
153
+
154
+ The writes to one group reach James one after the other. A deleted
155
+ user stays in the team mailboxes it belonged to: once its entry is gone, its
156
+ address cannot be read.
157
+
129
158
  ## API Endpoints Used
130
159
 
131
160
  ### Team Mailboxes
132
161
 
133
- - **Create**: `PUT /domains/{domain}/team-mailboxes/{teamMailbox}`
134
- - **Add member**: `PUT /domains/{domain}/team-mailboxes/{teamMailbox}/members/{memberEmail}`
135
- - **Delete member**: `DELETE /domains/{domain}/team-mailboxes/{teamMailbox}/members/{memberEmail}`
136
- - **Delete**: `DELETE /domains/{domain}/team-mailboxes/{teamMailbox}`
162
+ - **Create**: `PUT /domains/{domain}/team-mailboxes/{name}`
163
+ - **Add member**: `PUT /domains/{domain}/team-mailboxes/{name}/members/{memberEmail}`
164
+ - **Delete member**: `DELETE /domains/{domain}/team-mailboxes/{name}/members/{memberEmail}`
137
165
 
138
- ### Mailing Lists
139
-
140
- - **Add member**: `PUT /address/groups/{groupMail}/{memberEmail}`
141
- - **Delete member**: `DELETE /address/groups/{groupMail}/{memberEmail}`
142
- - **Delete**: `DELETE /address/groups/{groupMail}`
166
+ TMail names a team mailbox by the local part of its address, `{name}@{domain}`,
167
+ and accepts only letters, digits, `#`, `-` and `_` in it, up to 255 characters.
168
+ A group whose address has any other character, such as a dot, gets no team
169
+ mailbox: the plugin logs an error once, when the group comes to have such an
170
+ address, and does not call TMail. The name is lower-cased, so a change of case
171
+ of the address keeps the same team mailbox.
143
172
 
144
173
  ## Validation Rules
145
174
 
146
175
  ### Branch Restrictions
147
176
 
148
- When `--james-mailing-list-branches` is configured, strict branch separation is enforced:
149
-
150
- 1. **Mailing Lists**:
151
- - ✅ **MUST** be located within one of the specified branches
152
- - ❌ **CANNOT** be created outside these branches
153
- - If `--james-mailing-list-branches` is empty, no location restriction applies
154
-
155
- 2. **Team Mailboxes**:
156
- - ✅ **MUST NOT** be located within mailing list branches
157
- - ❌ **CANNOT** be created in branches reserved for mailing lists
158
- - ✅ **CAN** be created anywhere else in the LDAP tree
177
+ When `--james-mailing-list-branches` is configured, a team mailbox is not
178
+ created in James when the group is within one of these branches. It can be
179
+ created anywhere else in the LDAP tree.
159
180
 
160
181
  **Example Configuration:**
161
182
 
@@ -165,32 +186,27 @@ When `--james-mailing-list-branches` is configured, strict branch separation is
165
186
 
166
187
  **Allowed:**
167
188
 
168
- - `cn=sales-list,ou=lists,dc=example,dc=com` with `twakeMailboxType=mailingList` ✅
169
189
  - `cn=sales-team,ou=teams,dc=example,dc=com` with `twakeMailboxType=teamMailbox` ✅
170
190
  - `cn=sales-team,ou=groups,dc=example,dc=com` with `twakeMailboxType=teamMailbox` ✅
171
191
 
172
192
  **Rejected:**
173
193
 
174
- - `cn=sales-list,ou=teams,dc=example,dc=com` with `twakeMailboxType=mailingList` ❌ (wrong branch)
175
194
  - `cn=sales-team,ou=lists,dc=example,dc=com` with `twakeMailboxType=teamMailbox` ❌ (reserved for lists)
176
195
 
177
- **Validation Points:**
178
-
179
- - Group creation (`ldapgroupadddone`)
180
- - Mailbox type transitions (`handleMailboxTypeTransition`)
196
+ **Validation Points:** every write to the group. A team mailbox in these
197
+ branches gets no member either.
181
198
 
182
199
  **Error Handling:**
183
200
 
184
201
  - Validation failures are logged as errors
185
- - Group is created in LDAP but James mailbox is NOT created
202
+ - Group is created in LDAP but the team mailbox is NOT created in James
186
203
  - No exception thrown (silent failure with error log)
187
204
 
188
205
  ### Mailbox Type Defaults
189
206
 
190
207
  3. **Mailbox Type**:
191
- - If `twakeMailboxType` is not set and the group has a `mail` attribute, it defaults to `mailingList`
208
+ - If `twakeMailboxType` is not set and the group has a `mail` attribute, it is a mailing list
192
209
  - If `twakeMailboxType` is not set and the group has no `mail` attribute, it's a simple group (no James integration)
193
- - Default behavior is subject to branch validation rules
194
210
 
195
211
  ## Mailbox Type Transitions
196
212
 
@@ -211,9 +227,8 @@ await dm.ldap.modify('cn=sales,ou=groups,dc=example,dc=com', {
211
227
 
212
228
  **What happens:**
213
229
 
214
- 1. Deletes the mailing list from James (`DELETE /address/groups/{mail}`)
215
- 2. Creates the team mailbox (`PUT /domains/{domain}/team-mailboxes/{mail}`)
216
- 3. Adds all current members to the team mailbox
230
+ 1. Creates the team mailbox (`PUT /domains/{domain}/team-mailboxes/{name}`)
231
+ 2. Adds all current members to the team mailbox
217
232
 
218
233
  #### teamMailbox → mailingList
219
234
 
@@ -228,10 +243,8 @@ await dm.ldap.modify('cn=sales,ou=groups,dc=example,dc=com', {
228
243
 
229
244
  **What happens:**
230
245
 
231
- 1. Removes all members from the team mailbox (`DELETE /domains/{domain}/team-mailboxes/{mail}/members/{member}`)
246
+ 1. Removes all members from the team mailbox (`DELETE /domains/{domain}/team-mailboxes/{name}/members/{member}`)
232
247
  2. **Preserves the team mailbox** (does NOT delete it - can be recovered later)
233
- 3. Creates the mailing list (`PUT /address/groups/{mail}/{member}`)
234
- 4. Adds all current members to the mailing list
235
248
 
236
249
  #### group → mailingList or teamMailbox
237
250
 
@@ -251,8 +264,7 @@ await dm.ldap.modify('cn=developers,ou=groups,dc=example,dc=com', {
251
264
  **What happens:**
252
265
 
253
266
  1. No cleanup needed (was a simple group)
254
- 2. Creates the specified mailbox type (mailing list or team mailbox)
255
- 3. Adds all current members
267
+ 2. For a team mailbox: creates it and adds all current members; nothing is sent to James for a mailing list
256
268
 
257
269
  #### mailingList or teamMailbox → group
258
270
 
@@ -267,9 +279,8 @@ await dm.ldap.modify('cn=sales,ou=groups,dc=example,dc=com', {
267
279
 
268
280
  **What happens:**
269
281
 
270
- 1. If mailing list: deletes it from James
271
- 2. If team mailbox: removes all members (preserves mailbox)
272
- 3. Group becomes a simple group without mail functionality
282
+ 1. If team mailbox: removes all members (preserves mailbox)
283
+ 2. Group becomes a simple group without mail functionality
273
284
 
274
285
  ### Deleting Groups with Team Mailboxes
275
286
 
@@ -287,10 +298,6 @@ await dm.ldap.delete('cn=sales,ou=groups,dc=example,dc=com');
287
298
 
288
299
  **Rationale:** Team mailboxes may contain important emails and should not be automatically deleted. Administrators can manually delete them through James WebAdmin if needed.
289
300
 
290
- ## Backward Compatibility
291
-
292
- Existing groups with `mail` attribute but no `twakeMailboxType` will continue to work as mailing lists (backward compatible behavior).
293
-
294
301
  ## Testing
295
302
 
296
303
  Tests require the LDAP schema amendment to be applied first:
@@ -303,39 +310,19 @@ ldapmodify -Y EXTERNAL -H ldapi:/// -f docs/examples/twake-mailbox-type-schema-a
303
310
  sed 's/{ldap_base}/dc=example,dc=com/g' docs/examples/twake-mailbox-type-nomenclature.ldif | \
304
311
  ldapadd -x -D "cn=admin,dc=example,dc=com" -W
305
312
 
306
- # Run team mailbox tests
307
- npm run test:one test/plugins/twake/jamesTeamMailboxes.test.ts
308
-
309
- # Run mailbox type transition tests
310
- npm run test:one test/plugins/twake/jamesMailboxTypeTransitions.test.ts
313
+ # Run the group tests
314
+ npm run test:one test/plugins/twake/jamesGroups.test.ts
311
315
  ```
312
316
 
313
317
  ### Test Coverage
314
318
 
315
- - **jamesTeamMailboxes.test.ts** (4 tests):
316
- - Create team mailbox
317
- - Add member to team mailbox
318
- - Remove member from team mailbox
319
- - Delete team mailbox group (removes members, preserves mailbox)
320
-
321
- - **jamesMailboxTypeTransitions.test.ts** (7 tests):
322
- - Transition from mailingList to teamMailbox
323
- - Transition from teamMailbox to mailingList
324
- - Transition from group to teamMailbox
325
- - Transition from teamMailbox to group
326
- - Transition from group to mailingList
327
- - Transition from mailingList to group
328
- - Delete group with teamMailbox (removes members only)
329
-
330
- - **jamesBranchValidation.test.ts** (8 tests):
331
- - Allow mailing list in allowed branch
332
- - Reject mailing list outside allowed branch
333
- - Allow team mailbox outside mailing list branch
334
- - Reject team mailbox inside mailing list branch
335
- - Reject transition to mailing list outside allowed branch
336
- - Reject transition to team mailbox inside mailing list branch
337
- - Allow mailing lists anywhere when restrictions disabled
338
- - Allow team mailboxes anywhere when restrictions disabled
319
+ **jamesGroups.test.ts** drives the groups API and records every call made to
320
+ James:
321
+
322
+ - Mailing lists, typed or not: no address group, from creation to deletion
323
+ - A group without mail: no call
324
+ - Team mailboxes: creation, the `/members` routes, a `replace` of the
325
+ members, deletion, type changes, a new address, a mailing list branch
339
326
 
340
327
  ## References
341
328
 
@@ -33,10 +33,31 @@ This plugin intercepts group member validation and automatically creates missing
33
33
  ### Important Notes
34
34
 
35
35
  - **Dependencies**: This plugin requires the `core/ldap/groups` plugin
36
- - **DN Format**: External members are in the format `mail={email},{external_members_branch}`
37
- - **Domain Protection**: External users cannot be created if their mail are in managed domains (configured via `--mail-domain`)
36
+ - **DN Format**: External members are in the format `mail={email},{external_members_branch}`,
37
+ the address escaped as any DN value (RFC 4514): `mail=a\+b@partner.com,…`
38
+ creates an entry whose `mail` is `a+b@partner.com`. Only the direct children of the
39
+ branch are external members.
40
+ - **Domain Protection**: External users cannot be created if their mail are in managed domains (configured via `--mail-domain`, compared case-insensitively)
38
41
  - **Automatic Creation**: Users are created automatically when added to a group if they don't exist
39
42
 
43
+ ### Config API
44
+
45
+ `GET /api/v1/config` tells a client whether external members are accepted, and
46
+ where to send them:
47
+
48
+ ```json
49
+ "externalUsersInGroups": {
50
+ "enabled": true,
51
+ "branch": "ou=contacts,dc=example,dc=com",
52
+ "rdnAttribute": "mail",
53
+ "managedDomains": ["example.com"]
54
+ }
55
+ ```
56
+
57
+ A client turns an address into a member with
58
+ `rdnAttribute=<escaped address>,<branch>`, and can refuse a `managedDomains`
59
+ address before sending it.
60
+
40
61
  ## How It Works
41
62
 
42
63
  ### Member Validation Hook
@@ -141,9 +141,10 @@ Fixed attributes:
141
141
 
142
142
  ### Naming things, in the reader's language
143
143
 
144
- `label` is what a client shows instead of the attribute name, and `entity.label`
145
- / `entity.singularLabel` are what it calls the collection and one of its
146
- entries. Each may be a plain string, or a map keyed by language tag:
144
+ `label` is what a client shows instead of the attribute name, `group` the form
145
+ section it shows the attribute in, and `entity.label` / `entity.singularLabel`
146
+ are what it calls the collection and one of its entries. Each, and `hint`
147
+ below, may be a plain string, or a map keyed by language tag:
147
148
 
148
149
  ```json
149
150
  {
@@ -159,6 +160,11 @@ entries. Each may be a plain string, or a map keyed by language tag:
159
160
  "type": "pointer",
160
161
  "role": "organizationLink",
161
162
  "label": { "en": "Department", "fr": "Organisation" }
163
+ },
164
+ "mailQuotaSize": {
165
+ "type": "string",
166
+ "group": { "en": "Mailbox Settings", "fr": "Paramètres de messagerie" },
167
+ "label": { "en": "Mailbox size", "fr": "Taille de boîte" }
162
168
  }
163
169
  }
164
170
  }
@@ -202,14 +208,19 @@ type, before they get it wrong:
202
208
  "telephoneNumber": {
203
209
  "type": "string",
204
210
  "test": "^\\(\\+99\\)\\s\\d{3}\\s\\d{4}$",
205
- "hint": "Expected pattern (+99) 999 9999"
211
+ "hint": {
212
+ "en": "Expected pattern (+99) 999 9999",
213
+ "fr": "Format attendu : (+99) 999 9999"
214
+ }
206
215
  }
207
216
  }
208
217
  ```
209
218
 
210
219
  The hint travels with the schema, so a client shows it under the field and the
211
220
  server repeats it when it rejects a value — the pattern and its explanation
212
- cannot drift apart, and neither is hardcoded in the interface.
221
+ cannot drift apart, and neither is hardcoded in the interface. A translated
222
+ hint is picked like a label; the server's messages are in English, so it
223
+ quotes the English text.
213
224
 
214
225
  ### Attributes a client may not send
215
226
 
@@ -221,6 +232,13 @@ cannot drift apart, and neither is hardcoded in the interface.
221
232
  Both restrict the **request body** only: the core and its plugins still write
222
233
  these attributes.
223
234
 
235
+ The read of one entry (`GET /api/v1/ldap/{resource}/{id}`) asks the directory
236
+ for every attribute the schema declares besides the usual ones, so an
237
+ operational attribute such as `memberOf` is returned when the directory
238
+ computes it — with OpenLDAP, when the `memberof` overlay is configured for the
239
+ group class and member attribute in use (`groupOfNames` and `member` for the
240
+ Twake schemas). Lists return the usual attributes only.
241
+
224
242
  ### Attributes a client never receives
225
243
 
226
244
  `neverReturn` strips an attribute from every API answer while leaving it
@@ -168,7 +168,7 @@ Shows 4xx and 5xx responses:
168
168
 
169
169
  ```
170
170
  [info] GET /api/v1/ldap/users/notfound 404 12ms
171
- [info] POST /api/v1/ldap/users 400 8ms {"error":"Missing required field: cn"}
171
+ [info] POST /api/v1/ldap/users 400 8ms {"error":"Attribute \"cn\" is required"}
172
172
  [info] GET /api/v1/ldap/users 500 234ms {"error":"LDAP connection timeout"}
173
173
  ```
174
174
 
@@ -4,6 +4,54 @@ What to check before deploying, newest first. Only releases that need a
4
4
  decision or a configuration change appear here; see the
5
5
  [CHANGELOG](../../CHANGELOG.md) for everything else.
6
6
 
7
+ ## To 0.19.0
8
+
9
+ ### Forwards are no longer copied to Twake Mail
10
+
11
+ **Who is affected:** a deployment that loads `twake/james` and stores
12
+ forwards in `--forward-attribute` (`mailForwardingAddress` by default).
13
+
14
+ `twake/james` no longer applies the changes of that attribute to Twake Mail's
15
+ forwards: users set them in Twake Mail. The forwards already in Twake Mail
16
+ stay as they are, except those left on an address an account takes, removed
17
+ as before,
18
+ [details](plugins/integrations/james-mail.md#forwards-left-on-an-address).
19
+
20
+ To keep the directory as the owner of the forwards, set
21
+ `--james-sync-forwards` (`DM_JAMES_SYNC_FORWARDS=true`); it then overwrites
22
+ what users set in Twake Mail,
23
+ [details](plugins/integrations/james-mail.md#forwards).
24
+
25
+ ## To 0.18.0
26
+
27
+ ### Mailing lists are no longer copied to James
28
+
29
+ **Who is affected:** a deployment that loads `twake/james`.
30
+
31
+ `twake/james` no longer creates, fills or deletes James address groups
32
+ (`/address/groups`) for mailing lists, the groups with a `mail` whose
33
+ `twakeMailboxType` is `mailingList` or is not set. Twake Mail must read them
34
+ from LDAP with its `LDAPMailingList` mailet: without it, a mail sent to a
35
+ list address is no longer delivered to its members.
36
+
37
+ The address groups already created for these lists stay in James. Delete
38
+ them: `GET /address/groups` lists the address groups,
39
+ `DELETE /address/groups/{group}` deletes one.
40
+
41
+ `--james-mailing-list-branches` now only keeps team mailboxes out of these
42
+ branches.
43
+
44
+ ### The Twake schemas translate their hints and form sections
45
+
46
+ **Who is affected:** a deployment serving the shipped Twake schemas
47
+ (`twake/*.json`, or a schema extending one) to a client that reads `hint` or
48
+ `group` as a plain string.
49
+
50
+ These are now maps keyed by language tag, as `label` already was:
51
+ `{ "en": "Mailbox Settings", "fr": "Paramètres de messagerie" }`. Such a client
52
+ shows them as `[object Object]`, or not at all: upgrade it along with the
53
+ server.
54
+
7
55
  ## To 0.17.0
8
56
 
9
57
  ### The quota attribute defaults to `mailQuotaSize`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldap-rest",
3
- "version": "0.17.1",
3
+ "version": "0.19.0",
4
4
  "description": "Light directory manager",
5
5
  "keywords": [
6
6
  "Identity-Manager"
@@ -1,4 +1,5 @@
1
1
  import { CacheManager } from '../cache/CacheManager.js';
2
+ import { hasRole } from '../../shared/utils/schema.js';
2
3
 
3
4
  /**
4
5
  * LDAP Resource Editor - Generic API Client
@@ -164,7 +165,7 @@ class ResourceApiClient {
164
165
  if (resource.schemaUrl) {
165
166
  try {
166
167
  const schema = await this.getSchema(resource.schemaUrl);
167
- const displayField = Object.entries(schema.attributes).find(([, attr]) => attr.role === 'displayName');
168
+ const displayField = Object.entries(schema.attributes).find(([, attr]) => hasRole(attr, 'displayName'));
168
169
  if (displayField) {
169
170
  displayNameField = displayField[0];
170
171
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceApiClient.js","sources":["../../../../../src/browser/ldap-resource-editor/api/ResourceApiClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;AAEG;MAWU,iBAAiB,CAAA;AAK5B,IAAA,WAAA,CACE,YAA0B,EAC1B,OAAA,GAAkB,EAAE,EACpB,YAAoD,EAAA;AAEpD,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY;AAChC,QAAA,IAAI,CAAC,OAAO;AACV,YAAA,OAAO,KAAK,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE,CA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,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;IAC9B;IAEA,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;AACD;;;;"}
1
+ {"version":3,"file":"ResourceApiClient.js","sources":["../../../../../src/browser/ldap-resource-editor/api/ResourceApiClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;AAEG;MAYU,iBAAiB,CAAA;AAK5B,IAAA,WAAA,CACE,YAA0B,EAC1B,OAAA,GAAkB,EAAE,EACpB,YAAoD,EAAA;AAEpD,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY;AAChC,QAAA,IAAI,CAAC,OAAO;AACV,YAAA,OAAO,KAAK,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC;;AAG3C,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,YAAA,MAAM,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;QACpE;IACF;IAEQ,UAAU,GAAA;AAChB,QAAA,OAAO,CAAA,EAAG,IAAI,CAAC,OAAO,SAAS;IACjC;IAEQ,mBAAmB,GAAA;QACzB,OAAO,CAAA,EAAG,IAAI,CAAC,UAAU,EAAE,SAAS,IAAI,CAAC,YAAY,CAAA,CAAE;IACzD;AAEQ,IAAA,aAAa,CAAC,KAAc,EAAA;AAClC,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AACrB,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,YAAA,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;AAC/C,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;AAEA;;AAEG;AACK,IAAA,MAAM,WA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,MAAM,EACN,KAAK,CACN;AACD,YAAA,OAAO,EAAE;QACX;IACF;AAEA;;AAEG;IACK,gBAAgB,GAAA;AACtB,QAAA,QAAQ,IAAI,CAAC,YAAY;AACvB,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,KAAK;AACd,YAAA,KAAK,QAAQ;AACX,gBAAA,OAAO,IAAI;AACb,YAAA,KAAK,eAAe;AAClB,gBAAA,OAAO,IAAI;AACb,YAAA;AACE,gBAAA,OAAO,IAAI;;IAEjB;AAEA;;AAEG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;IACpB;AAEA,IAAA,eAAe,CAAC,OAAe,EAAA;AAC7B,QAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACvC;IAEA,aAAa,GAAA;AAMX,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;IAC9B;IAEA,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;AACD;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { CacheManager } from '../cache/CacheManager.js';
2
+ import { hasRole } from '../../shared/utils/schema.js';
2
3
 
3
4
  /**
4
5
  * LDAP User Editor - API Client
@@ -149,7 +150,7 @@ class UserApiClient {
149
150
  try {
150
151
  const schema = await this.getSchema(resource.schemaUrl);
151
152
  // Find field with displayName role
152
- const displayField = Object.entries(schema.attributes).find(([, attr]) => attr.role === 'displayName');
153
+ const displayField = Object.entries(schema.attributes).find(([, attr]) => hasRole(attr, 'displayName'));
153
154
  if (displayField) {
154
155
  displayNameField = displayField[0];
155
156
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UserApiClient.js","sources":["../../../../../src/browser/ldap-user-editor/api/UserApiClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;AAEG;MAKU,aAAa,CAAA;IAIxB,WAAA,CACE,OAAA,GAAkB,EAAE,EACpB,YAAoD,EAAA;AAEpD,QAAA,I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EA;;AAEG;AACH,IAAA,eAAe,CAAC,OAAe,EAAA;AAC7B,QAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACvC;AAEA;;AAEG;IACH,aAAa,GAAA;AAMX,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;IAC9B;AAEA;;AAEG;IACH,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;AACD;;;;"}
1
+ {"version":3,"file":"UserApiClient.js","sources":["../../../../../src/browser/ldap-user-editor/api/UserApiClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;AAEG;MAMU,aAAa,CAAA;IAIxB,WAAA,CACE,OAAA,GAAkB,EAAE,EACpB,YAAoD,EAAA;AAEpD,QAAA,IAAI,CAAC,OAAO;AACV,YAAA,OAAO,KAAK,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC;;AAG3C,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,YAAA,MAAM,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;QACpE;IACF;IAEQ,UAAU,GAAA;AAChB,QAAA,OAAO,CAAA,EAAG,IAAI,CAAC,OAAO,SAAS;IACjC;AAEQ,IAAA,aAAa,CAAC,KAAc,EAAA;AAClC,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AACrB,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,YAAA,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;AAC/C,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;AAEA;;AAEG;AACK,IAAA,MAAM,WAAW,CAAI,GAAW,EAAE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CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBAC5D,OAAO;wBACL,EAAE,EAAE,IAAI,CAAC,EAAE;AACX,wBAAA,KAAK,EAAE,WAAW,IAAI,UAAU,IAAI,IAAI,CAAC,EAAE;qBAC5C;AACH,gBAAA,CAAC,CAAC;YACJ;;AAGA,YAAA,MAAM,IAAI,KAAK,CAAC,+CAA+C,MAAM,CAAA,CAAE,CAAC;QAC1E;QAAE,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CACX,4CAA4C,EAC5C,MAAM,EACN,KAAK,CACN;AACD,YAAA,OAAO,EAAE;QACX;IACF;AAEA;;AAEG;AAEH;;AAEG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;IACpB;AAEA;;AAEG;AACH,IAAA,eAAe,CAAC,OAAe,EAAA;AAC7B,QAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACvC;AAEA;;AAEG;IACH,aAAa,GAAA;AAMX,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;IAC9B;AAEA;;AAEG;IACH,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;AACD;;;;"}
@@ -1,5 +1,6 @@
1
1
  import { PointerField } from './PointerField.js';
2
2
  import { MoveUserModal } from './MoveUserModal.js';
3
+ import { hasRole, localizedText } from '../../shared/utils/schema.js';
3
4
 
4
5
  /**
5
6
  * LDAP User Editor - User Editor Component
@@ -101,7 +102,7 @@ class UserEditor {
101
102
  getFieldByRole(role) {
102
103
  if (!this.schema || !this.user)
103
104
  return '';
104
- const field = Object.entries(this.schema.attributes).find(([, attr]) => attr.role === role);
105
+ const field = Object.entries(this.schema.attributes).find(([, attr]) => hasRole(attr, role));
105
106
  if (!field)
106
107
  return '';
107
108
  const [fieldName] = field;
@@ -158,11 +159,12 @@ class UserEditor {
158
159
  // Skip objectClass (it's fixed)
159
160
  if (fieldName === 'objectClass')
160
161
  continue;
161
- if (attr.group) {
162
- if (!groupedFields[attr.group]) {
163
- groupedFields[attr.group] = [];
162
+ const group = localizedText(attr.group);
163
+ if (group) {
164
+ if (!groupedFields[group]) {
165
+ groupedFields[group] = [];
164
166
  }
165
- groupedFields[attr.group].push(fieldName);
167
+ groupedFields[group].push(fieldName);
166
168
  }
167
169
  else {
168
170
  ungroupedFields.push(fieldName);
@@ -207,11 +209,12 @@ class UserEditor {
207
209
  return '';
208
210
  }
209
211
  // Hide organizationLink and organizationPath fields - use Move button instead
210
- if (attr.role === 'organizationLink' || attr.role === 'organizationPath') {
212
+ if (hasRole(attr, 'organizationLink') ||
213
+ hasRole(attr, 'organizationPath')) {
211
214
  return '';
212
215
  }
213
216
  // Show identifier fields as disabled
214
- if (attr.role === 'identifier') {
217
+ if (hasRole(attr, 'identifier')) {
215
218
  return this.renderIdentifierField(fieldName);
216
219
  }
217
220
  // Pointer fields
@@ -494,7 +497,7 @@ class UserEditor {
494
497
  if (!this.user || !this.schema)
495
498
  return;
496
499
  // Find the organizationLink field to get current organization
497
- const orgLinkField = Object.entries(this.schema.attributes).find(([, attr]) => attr.role === 'organizationLink');
500
+ const orgLinkField = Object.entries(this.schema.attributes).find(([, attr]) => hasRole(attr, 'organizationLink'));
498
501
  if (!orgLinkField) {
499
502
  alert('This user type does not support moving between organizations');
500
503
  return;