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.
@@ -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 mailQuota \
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: `mailQuota`)
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
- "mailQuota": "5000000000"
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 mailQuota \
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 mailQuota \
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": {"mailQuota": "5000000000"}}'
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 | `"mailQuota": "1000000000"` |
786
- | 5 GB | 5000000000 | `"mailQuota": "5000000000"` |
787
- | 10 GB | 10000000000 | `"mailQuota": "10000000000"` |
788
- | Unlimited | -1 | `"mailQuota": "-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 mailQuota
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
@@ -8,7 +8,7 @@ LDAP-Rest, and hooks for the attributes other plugins follow.
8
8
  ```bash
9
9
  --plugin core/ldap/onChange \
10
10
  --mail-attribute mail \
11
- --quota-attribute mailQuota
11
+ --quota-attribute mailQuotaSize
12
12
  ```
13
13
 
14
14
  ## Hooks
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldap-rest",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "description": "Light directory manager",
5
5
  "keywords": [
6
6
  "Identity-Manager"
@@ -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,