-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address book data lost when any user receiving a share is deleted #3473
Conversation
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Cc @nickvergessen @MorrisJobke @schiessle @blizzz for testing too since this is high impact :O |
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
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. |
@@ -195,6 +195,33 @@ function getAddressBooksForUser($principalUri) { | |||
return array_values($addressBooks); | |||
} | |||
|
|||
function getUsersOwnAddressBooks($principalUri) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already some unit tests for it in testDeleteCalendar
. Is it enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) <[email protected]>
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