Skip to content

Commit b99a437

Browse files
Merge pull request #60330 from nextcloud/backport/60311/stable32
[stable32] fix(files_sharing): apply link share password on first save
2 parents 1e08709 + dae36bc commit b99a437

9 files changed

Lines changed: 28 additions & 12 deletions

apps/files_sharing/src/models/Share.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ export default class Share {
3838
}
3939
ocsData.attributes = ocsData.attributes ?? []
4040

41+
// Pre-declared so Vue 2 makes newPassword reactive at observation time,
42+
// avoiding $set's property-addition path which races with async setters.
43+
ocsData.newPassword = ocsData.newPassword ?? undefined
44+
4145
// store state
4246
this._share = ocsData
4347
}
@@ -278,6 +282,18 @@ export default class Share {
278282
this._share.password = password
279283
}
280284

285+
/**
286+
* Unsaved password (set during share creation or editing).
287+
* Delegates to _share so reads/writes go through the reactive state.
288+
*/
289+
get newPassword(): string | undefined {
290+
return this._share.newPassword
291+
}
292+
293+
set newPassword(value: string | undefined) {
294+
this._share.newPassword = value
295+
}
296+
281297
/**
282298
* Password expiration time
283299
* @return {string} date with YYYY-MM-DD format

dist/5819-5819.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/5819-5819.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/9108-9108.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/9108-9108.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-init.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)