cozy-sharing 40.1.8 → 40.1.9
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/CHANGELOG.md +6 -0
- package/dist/components/ShareRestrictionModal/helpers.js +2 -1
- package/dist/components/ShareRestrictionModal/helpers.spec.js +2 -2
- package/package.json +3 -3
- package/src/components/ShareRestrictionModal/helpers.js +2 -1
- package/src/components/ShareRestrictionModal/helpers.spec.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [40.1.9](https://github.com/cozy/cozy-libs/compare/cozy-sharing@40.1.8...cozy-sharing@40.1.9) (2026-10-28)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **cozy-sharing:** Keep the link password when its field is left empty ([a842354](https://github.com/cozy/cozy-libs/commit/a84235406035b9fe98edc6d2e59fd4ee37cbd5f0)), closes [linagora/twake-drive#4317](https://github.com/linagora/twake-drive/issues/4317)
|
|
11
|
+
|
|
6
12
|
## [40.1.8](https://github.com/cozy/cozy-libs/compare/cozy-sharing@40.1.7...cozy-sharing@40.1.8) (2026-10-27)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package cozy-sharing
|
|
@@ -288,7 +288,8 @@ export var getLinkAccessOptions = function getLinkAccessOptions(_ref6) {
|
|
|
288
288
|
verbs: editingRights === 'write' ? WRITE_PERMS : READ_ONLY_PERMS,
|
|
289
289
|
expiresAt: (expirationDate === null || expirationDate === void 0 ? void 0 : expirationDate.toISOString()) || '',
|
|
290
290
|
ttl: expirationDate ? makeTTL(expirationDate) : undefined,
|
|
291
|
-
|
|
291
|
+
// An empty field means "unchanged": undefined is left out of the request
|
|
292
|
+
password: passwordEnabled ? password || undefined : ''
|
|
292
293
|
};
|
|
293
294
|
};
|
|
294
295
|
/**
|
|
@@ -154,7 +154,7 @@ describe('ShareRestrictionModal/helpers', function () {
|
|
|
154
154
|
}
|
|
155
155
|
}, _callee3);
|
|
156
156
|
})));
|
|
157
|
-
it('should call updateDocumentPermissions with empty date
|
|
157
|
+
it('should call updateDocumentPermissions with an empty date and keep the password if enabled without values', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
158
158
|
var updateDocumentPermissions, file;
|
|
159
159
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
160
160
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -180,7 +180,7 @@ describe('ShareRestrictionModal/helpers', function () {
|
|
|
180
180
|
case 4:
|
|
181
181
|
expect(updateDocumentPermissions).toHaveBeenCalledWith(file, {
|
|
182
182
|
expiresAt: '',
|
|
183
|
-
password:
|
|
183
|
+
password: undefined,
|
|
184
184
|
verbs: ['GET']
|
|
185
185
|
});
|
|
186
186
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "40.1.
|
|
3
|
+
"version": "40.1.9",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"cozy-intent": "^2.31.1",
|
|
59
59
|
"cozy-minilog": "^3.10.1",
|
|
60
60
|
"cozy-ui": "^140.5.0",
|
|
61
|
-
"cozy-ui-plus": "^14.1.
|
|
61
|
+
"cozy-ui-plus": "^14.1.4",
|
|
62
62
|
"jest": "30.3.0",
|
|
63
63
|
"jest-environment-jsdom": "30.3.0",
|
|
64
64
|
"react": "16.12.0",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"sideEffects": [
|
|
85
85
|
"*.css"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "4dc5561f74fe7d2d000b112026294e208221a4d7"
|
|
88
88
|
}
|
|
@@ -206,7 +206,8 @@ export const getLinkAccessOptions = ({
|
|
|
206
206
|
verbs: editingRights === 'write' ? WRITE_PERMS : READ_ONLY_PERMS,
|
|
207
207
|
expiresAt: expirationDate?.toISOString() || '',
|
|
208
208
|
ttl: expirationDate ? makeTTL(expirationDate) : undefined,
|
|
209
|
-
|
|
209
|
+
// An empty field means "unchanged": undefined is left out of the request
|
|
210
|
+
password: passwordEnabled ? password || undefined : ''
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
|
|
@@ -124,7 +124,7 @@ describe('ShareRestrictionModal/helpers', () => {
|
|
|
124
124
|
})
|
|
125
125
|
})
|
|
126
126
|
|
|
127
|
-
it('should call updateDocumentPermissions with empty date
|
|
127
|
+
it('should call updateDocumentPermissions with an empty date and keep the password if enabled without values', async () => {
|
|
128
128
|
const updateDocumentPermissions = jest.fn()
|
|
129
129
|
const file = { _id: '123' }
|
|
130
130
|
|
|
@@ -143,7 +143,7 @@ describe('ShareRestrictionModal/helpers', () => {
|
|
|
143
143
|
|
|
144
144
|
expect(updateDocumentPermissions).toHaveBeenCalledWith(file, {
|
|
145
145
|
expiresAt: '',
|
|
146
|
-
password:
|
|
146
|
+
password: undefined,
|
|
147
147
|
verbs: ['GET']
|
|
148
148
|
})
|
|
149
149
|
})
|