Skip to content

Commit ee2d373

Browse files
Merge pull request #60329 from nextcloud/backport/60311/stable33
[stable33] fix(files_sharing): apply link share password on first save
2 parents b5b6c87 + fb29a8a commit ee2d373

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
@@ -39,6 +39,10 @@ export default class Share {
3939
}
4040
ocsData.attributes = ocsData.attributes ?? []
4141

42+
// Pre-declared so Vue 2 makes newPassword reactive at observation time,
43+
// avoiding $set's property-addition path which races with async setters.
44+
ocsData.newPassword = ocsData.newPassword ?? undefined
45+
4246
// store state
4347
this._share = ocsData
4448
}
@@ -281,6 +285,18 @@ export default class Share {
281285
this._share.password = password
282286
}
283287

288+
/**
289+
* Unsaved password (set during share creation or editing).
290+
* Delegates to _share so reads/writes go through the reactive state.
291+
*/
292+
get newPassword(): string | undefined {
293+
return this._share.newPassword
294+
}
295+
296+
set newPassword(value: string | undefined) {
297+
this._share.newPassword = value
298+
}
299+
284300
/**
285301
* Password expiration time
286302
*

dist/1598-1598.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/1598-1598.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/5419-5419.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/5419-5419.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)