Skip to content
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

Fix crash in RLMSyncConfiguration.initWithUser error mapping when a user is disabled/deleted from MongoDB Realm #7408

Merged
merged 19 commits into from
Sep 9, 2021

Conversation

dianaafanador3
Copy link
Contributor

@dianaafanador3 dianaafanador3 commented Aug 24, 2021

Fix crash in RLMSyncConfiguration.initWithUser error mapping when a user is disabled/deleted from MongoDB Realm dashboard (#7399)

Copy link
Contributor

@jsflax jsflax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is probably a way to test this using the admin API– would be good to see a test for it.

@dianaafanador3
Copy link
Contributor Author

There is probably a way to test this using the admin API– would be good to see a test for it.

Added a Test for this specific use case, deleting the user using the Admin API

@dianaafanador3 dianaafanador3 force-pushed the dp/fix_error_mapping_rlmsyncconfiguration branch from 8c09181 to 7d03ab2 Compare August 26, 2021 13:45
@dianaafanador3 dianaafanador3 force-pushed the dp/fix_error_mapping_rlmsyncconfiguration branch from 7d03ab2 to deaf01a Compare September 2, 2021 15:04
@dianaafanador3 dianaafanador3 force-pushed the dp/fix_error_mapping_rlmsyncconfiguration branch from 2bcd1fb to 92b480c Compare September 7, 2021 18:02
@dianaafanador3 dianaafanador3 force-pushed the dp/fix_error_mapping_rlmsyncconfiguration branch from 92b480c to 6c2412b Compare September 7, 2021 23:56
@dianaafanador3 dianaafanador3 self-assigned this Sep 7, 2021
@leemaguire leemaguire force-pushed the dp/fix_error_mapping_rlmsyncconfiguration branch from 6c2412b to 2bcd1fb Compare September 8, 2021 13:58
…ithub.com/realm/realm-cocoa into dp/fix_error_mapping_rlmsyncconfiguration

# Conflicts:
#	Realm/ObjectServerTests/SwiftObjectServerTests.swift
Realm/ObjectServerTests/RealmServer.swift Show resolved Hide resolved

let appServerId = try RealmServer.shared.retrieveAppId(clientAppId: appId)
let deleteUserEx = expectation(description: "delete-user")
RealmServer.shared.removeUserForApp(appServerId, userId: app.currentUser!.id) { result in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RealmServer.shared.removeUserForApp(appServerId, userId: app.currentUser!.id) { result in
RealmServer.shared.removeUserForApp(appServerId, userId: user.id) { result in

Copy link
Contributor

@leemaguire leemaguire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once changelog conflict is resolved

Realm/ObjectServerTests/RealmServer.swift Outdated Show resolved Hide resolved
Realm/ObjectServerTests/RealmServer.swift Outdated Show resolved Hide resolved
Realm/ObjectServerTests/RealmServer.swift Show resolved Hide resolved
@dianaafanador3 dianaafanador3 merged commit 652a3ea into master Sep 9, 2021
@dianaafanador3 dianaafanador3 deleted the dp/fix_error_mapping_rlmsyncconfiguration branch September 9, 2021 11:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants