ldap-rest 0.16.1 → 0.17.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/bin/sync-james.mjs +4 -4
- package/dist/abstract/ldapFlat.js +1 -1
- package/dist/config/args.js +1 -1
- package/dist/lib/ldapActions.js +1 -1
- package/dist/lib/ldapCodes.js +1 -1
- package/dist/lib/schemaFile.js +1 -0
- package/dist/plugins/ldap/bulkImport.js +1 -1
- package/dist/plugins/ldap/flatGeneric.js +1 -1
- package/dist/plugins/ldap/groups.js +1 -1
- package/dist/plugins/ldap/organizations.js +1 -1
- package/dist/plugins/scim/discovery.js +1 -1
- package/dist/plugins/scim/errors.js +1 -1
- package/dist/plugins/static.js +1 -1
- package/dist/plugins/twake/james.js +1 -1
- package/dist/src/abstract/ldapFlat.d.ts +9 -0
- package/dist/src/lib/ldapCodes.d.ts +7 -0
- package/dist/src/lib/schemaFile.d.ts +64 -0
- package/dist/src/plugins/ldap/flatGeneric.d.ts +7 -0
- package/dist/src/plugins/ldap/groups.d.ts +9 -0
- package/dist/src/plugins/ldap/organizations.d.ts +45 -0
- package/dist/src/plugins/static.d.ts +15 -1
- package/docs/client-development/api/rest-api.md +87 -1
- package/docs/client-development/schemas/README.md +86 -0
- package/docs/presentations/en.md +2 -2
- package/docs/presentations/fr.md +2 -2
- package/docs/usage/configuration.md +5 -1
- package/docs/usage/plugins/integrations/james-mail.md +13 -13
- package/docs/usage/plugins/ldap/README.md +1 -0
- package/docs/usage/plugins/ldap/on-change.md +1 -1
- package/docs/usage/upgrading.md +14 -0
- package/package.json +1 -1
- package/static/schemas/twake/users.json +0 -10
|
@@ -20,7 +20,7 @@ The `twake/james` plugin automatically synchronizes email address and quota chan
|
|
|
20
20
|
--plugin twake/james \
|
|
21
21
|
--ldap-flat-schema ./static/schemas/twake/users.json \
|
|
22
22
|
--mail-attribute mail \
|
|
23
|
-
--quota-attribute
|
|
23
|
+
--quota-attribute mailQuotaSize \
|
|
24
24
|
--james-webadmin-url http://james:8000 \
|
|
25
25
|
--james-webadmin-token "your-admin-token"
|
|
26
26
|
```
|
|
@@ -37,7 +37,7 @@ DM_JAMES_WEBADMIN_TOKEN="your-admin-token"
|
|
|
37
37
|
- `--james-webadmin-url`: James WebAdmin API base URL (required)
|
|
38
38
|
- `--james-webadmin-token`: Bearer token for James WebAdmin authentication (optional)
|
|
39
39
|
- `--mail-attribute`: LDAP attribute for email (default: `mail`)
|
|
40
|
-
- `--quota-attribute`: LDAP attribute for quota (default: `
|
|
40
|
+
- `--quota-attribute`: LDAP attribute for quota (default: `mailQuotaSize`)
|
|
41
41
|
- `--alias-attribute`: LDAP attribute for email aliases (default: `mailAlternateAddress`)
|
|
42
42
|
- `--james-mailbox-type-attribute`: LDAP attribute for mailbox type (default: `twakeMailboxType`)
|
|
43
43
|
|
|
@@ -130,7 +130,7 @@ When a user's quota changes:
|
|
|
130
130
|
PUT /api/v1/ldap/users/jdoe
|
|
131
131
|
{
|
|
132
132
|
"replace": {
|
|
133
|
-
"
|
|
133
|
+
"mailQuotaSize": "5000000000"
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
```
|
|
@@ -646,7 +646,7 @@ Alternative authentication methods (Basic Auth, JWT) can be configured via rever
|
|
|
646
646
|
--plugin twake/james \
|
|
647
647
|
--ldap-flat-schema ./schemas/twake/users.json \
|
|
648
648
|
--mail-attribute mail \
|
|
649
|
-
--quota-attribute
|
|
649
|
+
--quota-attribute mailQuotaSize \
|
|
650
650
|
--james-webadmin-url http://james:8000
|
|
651
651
|
```
|
|
652
652
|
|
|
@@ -663,7 +663,7 @@ Alternative authentication methods (Basic Auth, JWT) can be configured via rever
|
|
|
663
663
|
--ldap-flat-schema ./schemas/twake/users.json \
|
|
664
664
|
--ldap-flat-schema ./schemas/twake/positions.json \
|
|
665
665
|
--mail-attribute mail \
|
|
666
|
-
--quota-attribute
|
|
666
|
+
--quota-attribute mailQuotaSize \
|
|
667
667
|
--james-webadmin-url http://james:8000 \
|
|
668
668
|
--james-webadmin-token "james-admin-token" \
|
|
669
669
|
--static-path ./static \
|
|
@@ -770,7 +770,7 @@ curl http://james:8000/users/john.doe@company.com
|
|
|
770
770
|
curl -X PUT http://localhost:8081/api/v1/ldap/users/jdoe \
|
|
771
771
|
-H "Authorization: Bearer admin-token" \
|
|
772
772
|
-H "Content-Type: application/json" \
|
|
773
|
-
-d '{"replace": {"
|
|
773
|
+
-d '{"replace": {"mailQuotaSize": "5000000000"}}'
|
|
774
774
|
|
|
775
775
|
# Verify in James
|
|
776
776
|
curl http://james:8000/quota/users/jdoe@company.com/size
|
|
@@ -780,12 +780,12 @@ curl http://james:8000/quota/users/jdoe@company.com/size
|
|
|
780
780
|
|
|
781
781
|
Quota values are in **bytes**:
|
|
782
782
|
|
|
783
|
-
| Size | Bytes | Example
|
|
784
|
-
| --------- | ----------- |
|
|
785
|
-
| 1 GB | 1000000000 | `"
|
|
786
|
-
| 5 GB | 5000000000 | `"
|
|
787
|
-
| 10 GB | 10000000000 | `"
|
|
788
|
-
| Unlimited | -1 | `"
|
|
783
|
+
| Size | Bytes | Example |
|
|
784
|
+
| --------- | ----------- | -------------------------------- |
|
|
785
|
+
| 1 GB | 1000000000 | `"mailQuotaSize": "1000000000"` |
|
|
786
|
+
| 5 GB | 5000000000 | `"mailQuotaSize": "5000000000"` |
|
|
787
|
+
| 10 GB | 10000000000 | `"mailQuotaSize": "10000000000"` |
|
|
788
|
+
| Unlimited | -1 | `"mailQuotaSize": "-1"` |
|
|
789
789
|
|
|
790
790
|
## Synchronization Scenarios
|
|
791
791
|
|
|
@@ -941,7 +941,7 @@ hooks: {
|
|
|
941
941
|
|
|
942
942
|
```bash
|
|
943
943
|
--mail-attribute mail
|
|
944
|
-
--quota-attribute
|
|
944
|
+
--quota-attribute mailQuotaSize
|
|
945
945
|
```
|
|
946
946
|
|
|
947
947
|
3. Enable debug logging:
|
|
@@ -48,6 +48,7 @@ DELETE /api/v1/ldap/groups/{cn} # Delete group
|
|
|
48
48
|
GET /api/v1/ldap/organizations/top # Root organization
|
|
49
49
|
GET /api/v1/ldap/organizations/{dn}/subnodes # Sub-organizations
|
|
50
50
|
GET /api/v1/ldap/organizations/{dn}/subnodes/search # Search
|
|
51
|
+
GET /api/v1/ldap/organizations/{dn}/search # Search the whole subtree
|
|
51
52
|
POST /api/v1/ldap/organizations # Create
|
|
52
53
|
PUT /api/v1/ldap/organizations/{dn} # Modify
|
|
53
54
|
POST /api/v1/ldap/organizations/{dn}/move # Move
|
package/docs/usage/upgrading.md
CHANGED
|
@@ -4,6 +4,20 @@ 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.17.0
|
|
8
|
+
|
|
9
|
+
### The quota attribute defaults to `mailQuotaSize`
|
|
10
|
+
|
|
11
|
+
**Who is affected:** a deployment that loads `twake/james` or
|
|
12
|
+
`core/ldap/onChange`, or runs `bin/sync-james.mjs`, without setting
|
|
13
|
+
`--quota-attribute` (`DM_QUOTA_ATTRIBUTE`).
|
|
14
|
+
|
|
15
|
+
The default is now `mailQuotaSize`, the attribute the Twake schemas define,
|
|
16
|
+
instead of `mailQuota`. A directory that holds the quota in `mailQuota` must
|
|
17
|
+
set `DM_QUOTA_ATTRIBUTE=mailQuota` (or `--quota-attribute mailQuota`):
|
|
18
|
+
without it, quota changes are no longer sent to the mail server. A deployment
|
|
19
|
+
that already sets the option is unchanged.
|
|
20
|
+
|
|
7
21
|
## To 0.16.0
|
|
8
22
|
|
|
9
23
|
### Space events need the organization domain attribute
|
package/package.json
CHANGED
|
@@ -171,16 +171,6 @@
|
|
|
171
171
|
"fr": "Autres boîtes"
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
|
-
"mailQuota": {
|
|
175
|
-
"type": "number",
|
|
176
|
-
"required": false,
|
|
177
|
-
"role": "emailQuota",
|
|
178
|
-
"group": "Mailbox Settings",
|
|
179
|
-
"label": {
|
|
180
|
-
"en": "Mail quota",
|
|
181
|
-
"fr": "Quota"
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
174
|
"mailQuotaSize": {
|
|
185
175
|
"type": "number",
|
|
186
176
|
"required": false,
|