Commit 3c392aa
fix(files_sharing): restore state when updating share failed
We need to save the previous state - here the password - so that if the
update fails we can revert the shown state.
This happens e.g. if you have the password policy app and try to add an
unsecure password.
To reproduce (with password policy):
1. Create new link share
2. enable password protection
3. use insecure password like `1234`
4. save share
Now you see that the update failed, but the password protection is still
enabled. This happened because `password` and `newPassword` were
misused. `password` was already set when `newPassword` was not saved so
we could not know to what we need to reset when the update failed.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
[skip ci]1 parent f4b61b3 commit 3c392aa
File tree
3 files changed
+37
-27
lines changed- apps/files_sharing/src
- components
- mixins
- views
3 files changed
+37
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
630 | 631 | | |
631 | 632 | | |
632 | 633 | | |
| 634 | + | |
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
| |||
822 | 824 | | |
823 | 825 | | |
824 | 826 | | |
825 | | - | |
| 827 | + | |
826 | 828 | | |
827 | 829 | | |
828 | 830 | | |
| |||
837 | 839 | | |
838 | 840 | | |
839 | 841 | | |
840 | | - | |
| 842 | + | |
841 | 843 | | |
842 | 844 | | |
843 | 845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | | - | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
307 | 312 | | |
308 | 313 | | |
309 | 314 | | |
310 | 315 | | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
314 | | - | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
321 | 326 | | |
322 | | - | |
| 327 | + | |
323 | 328 | | |
| 329 | + | |
324 | 330 | | |
325 | 331 | | |
326 | 332 | | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
331 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
337 | 345 | | |
338 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
339 | 349 | | |
340 | 350 | | |
341 | 351 | | |
| |||
384 | 394 | | |
385 | 395 | | |
386 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
387 | 404 | | |
388 | 405 | | |
389 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
807 | 806 | | |
808 | 807 | | |
809 | 808 | | |
| |||
901 | 900 | | |
902 | 901 | | |
903 | 902 | | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
| 903 | + | |
908 | 904 | | |
909 | 905 | | |
910 | 906 | | |
| |||
928 | 924 | | |
929 | 925 | | |
930 | 926 | | |
931 | | - | |
| 927 | + | |
932 | 928 | | |
933 | 929 | | |
934 | 930 | | |
| |||
960 | 956 | | |
961 | 957 | | |
962 | 958 | | |
| 959 | + | |
963 | 960 | | |
964 | | - | |
965 | | - | |
966 | 961 | | |
967 | 962 | | |
968 | 963 | | |
| |||
1039 | 1034 | | |
1040 | 1035 | | |
1041 | 1036 | | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | 1037 | | |
1047 | 1038 | | |
1048 | 1039 | | |
| |||
0 commit comments