Address book data lost when any user receiving a share is deleted#3473
Address book data lost when any user receiving a share is deleted#3473
Conversation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
Cc @nickvergessen @MorrisJobke @schiessle @blizzz for testing too since this is high impact :O |
|
Ouch, sounds valid and the diff makes sense. Is it the same for calendars? Or how is the situation handled there? |
|
Calendar backend already has |
|
Yeah, I based my works on @tcitworld's previous pr :) |
|
Test fail unrelated. Restarted it. |
| return array_values($addressBooks); | ||
| } | ||
|
|
||
| function getUsersOwnAddressBooks($principalUri) { |
There was a problem hiding this comment.
please put a explicit "public" in front of the function. Seems like this file has a wired mixture here but I would like to keep it consistent with the other code.
Maybe it would also make sense to write a unit test for it?
There was a problem hiding this comment.
There is already some unit tests for it in testDeleteCalendar. Is it enough?
There was a problem hiding this comment.
And if you want bigger test, i'm sorry but I don't have the necessary knowledge to do correct ones here.
I'm too unfamiliar with the whole phpunit section here and don't have enough time to read to assimilate it :(
|
Tested it.... Beside the small stuff I mentioned above the code looks good and it works as expected! |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Codecov Report
@@ Coverage Diff @@
## master #3473 +/- ##
============================================
+ Coverage 54.16% 54.16% +<.01%
- Complexity 21007 21185 +178
============================================
Files 1306 1306
Lines 80206 81105 +899
Branches 1255 1300 +45
============================================
+ Hits 43441 43932 +491
- Misses 36765 37173 +408
Continue to review full report at Codecov.
|
|
Please also make a PR against stable11 so we can fix it before the release on friday, thanks! |
|
@skjnldsv great stuff, thx! Could you also create a backport PR against stable11? |
|
Of course! |
|
@skjnldsv @blizzz @schiessle @nickvergessen @tcitworld Would it make sense to adopt the stuff from upstream: owncloud/core#27169 ... it looks similar but seems to go a different way. Which code is better? Or should we just keep it how it is? |
|
I would keep ours, theirs looks incomplete to me. |
Fix nextcloud/contacts#64
Reference: #1545
@nextcloud/contacts @cemrich @jeweloper @nickallevato