-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(DOCSP-39525): Consolidate Create and Delete Users page (#3289)
## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39525 *Staged Page* - [Create, Delete, and Remove Users](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39525/sdk/users/create-and-delete-users/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Flutter: Delete a User](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/delete-user/) - [Java: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/create-delete-users/) - [Kotlin: Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/delete-users/) - [.NET: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/create-and-delete-users/) - [Node.js: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/create-delete-users/) - [Swift: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/create-and-delete-users/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page
- Loading branch information
Showing
22 changed files
with
522 additions
and
4 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...cludes/api-details/cpp/users/create-delete-users-delete-users-not-supported.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The C++ SDK does not have the ability to delete users through the SDK. | ||
You can delete users from the server using the :ref:`App Services | ||
Admin API <admin-api>` ``delete a user`` endpoints. You could optionally | ||
create an :ref:`Atlas Function <functions>` that uses the Admin API to | ||
delete a user, and :ref:`call the function from the SDK <sdks-call-function>`. |
3 changes: 3 additions & 0 deletions
3
...cludes/api-details/cpp/users/create-delete-users-remove-users-not-supported.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The C++ SDK does not have the ability to remove users through the SDK. | ||
Instead, you could :ref:`log out the user <sdks-logout>`, and then manually | ||
delete the user's synced database and cached app files from the filesystem. |
3 changes: 3 additions & 0 deletions
3
...ludes/api-details/csharp/users/create-delete-users-delete-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
To delete a user, call the :dotnet-sdk:`DeleteUserFromServerAsync(User) | ||
<reference/Realms.Sync.App.html#Realms_Sync_App_DeleteUserFromServerAsync_Realms_Sync_User_>` | ||
method. |
3 changes: 3 additions & 0 deletions
3
...ludes/api-details/csharp/users/create-delete-users-remove-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Call the :dotnet-sdk:`RemoveUserAsync(User) | ||
<reference/Realms.Sync.App.html#Realms_Sync_App_RemoveUserAsync_Realms_Sync_User_>` | ||
method to remove the user and their data from the device. |
2 changes: 2 additions & 0 deletions
2
...ncludes/api-details/dart/users/create-delete-users-delete-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Call the :flutter-sdk:`App.deleteUser() <realm/App/deleteUser.html>` | ||
on a user object to delete the user's account from your App Services App. |
2 changes: 2 additions & 0 deletions
2
...ncludes/api-details/dart/users/create-delete-users-remove-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Call the :flutter-sdk:`App.removeUser() <realm/latest/realm/App/removeUser.html>` | ||
on a user object to remove the user and their data from the device. |
5 changes: 5 additions & 0 deletions
5
...ludes/api-details/java/users/create-delete-users-delete-users-not-supported.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The Java SDK does not have the ability to delete users through the SDK. | ||
You can delete users from the server using the :ref:`App Services | ||
Admin API <admin-api>` ``delete a user`` endpoints. You could optionally | ||
create an :ref:`Atlas Function <functions>` that uses the Admin API to | ||
delete a user, and :ref:`call the function from the SDK <sdks-call-function>`. |
5 changes: 5 additions & 0 deletions
5
...ncludes/api-details/java/users/create-delete-users-remove-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To remove a ``User`` object from your client app, call the | ||
:java-sdk:`User.remove() <io/realm/mongodb/User.html#remove()>` or | ||
:java-sdk:`User.removeAsync() | ||
<io/realm/mongodb/User.html#removeAsync(io.realm.mongodb.App.Callback)>` | ||
method. |
3 changes: 3 additions & 0 deletions
3
...details/javascript/users/create-delete-users-delete-users-js-ts-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Call the :js-sdk:`App.deleteUser() <classes/App.html#deleteUser>` method with a | ||
user object to delete the user from your App Services App. This deletes the | ||
object from the server in addition to clearing data from the device. |
4 changes: 4 additions & 0 deletions
4
...details/javascript/users/create-delete-users-remove-users-js-ts-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Call the :js-sdk:`App.removeUser() | ||
<https://www.mongodb.com/docs/realm-sdks/js/latest/classes/App.html#removeUser>` | ||
method with a user object to remove the user from the device. This clears user | ||
data from the device, but does not delete the user from Atlas. |
3 changes: 3 additions & 0 deletions
3
...ludes/api-details/kotlin/users/create-delete-users-delete-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
To permanently delete a ``User`` object from both your client app | ||
*and* the Atlas App Services App, call the :kotlin-sync-sdk:`delete | ||
<io.realm.kotlin.mongodb/-user/delete.html>` method on a logged-in user: |
3 changes: 3 additions & 0 deletions
3
...ludes/api-details/kotlin/users/create-delete-users-remove-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
To remove a ``User`` object from your client app, call the | ||
:kotlin-sync-sdk:`remove <io.realm.kotlin.mongodb/-user/remove.html>` | ||
method on a user: |
5 changes: 5 additions & 0 deletions
5
...s/api-details/objectivec/users/create-delete-users-delete-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
You can call the :objc-sdk:`-deleteWithCompletion | ||
<Classes/RLMUser.html#/c:objc(cs)RLMUser(im)deleteWithCompletion:>` | ||
method on a :objc-sdk:`RLMUser object <Classes/RLMUser.html>` to delete the | ||
user object from your App Services App. This deletes the object from the | ||
server in addition to clearing data from the device. |
5 changes: 5 additions & 0 deletions
5
...s/api-details/objectivec/users/create-delete-users-remove-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
You can call the :objc-sdk:`-removeWithCompletion | ||
<Classes/RLMUser.html#/c:objc(cs)RLMUser(im)removeWithCompletion:>` | ||
method on a :objc-sdk:`RLMUser object <Classes/RLMUser.html>` to remove the | ||
user from the device. This clears user data from the device, but does not | ||
delete the user from Atlas. |
5 changes: 5 additions & 0 deletions
5
...cludes/api-details/swift/users/create-delete-users-delete-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
You can call the :swift-sdk:`delete | ||
<Extensions/User.html#/s:So7RLMUserC10RealmSwiftE6delete7Combine6FutureCyyts5Error_pGyF>` | ||
method on a user object to delete the user object from your App Services App. | ||
This deletes the object from the server in addition to clearing data from the | ||
device. |
4 changes: 4 additions & 0 deletions
4
...cludes/api-details/swift/users/create-delete-users-remove-users-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
You can call the :swift-sdk:`remove | ||
<Extensions/User.html#/s:So7RLMUserC10RealmSwiftE6remove7Combine6FutureCyyts5Error_pGyF>` | ||
method on a user object to remove the user from the device. This clears user | ||
data from the device, but does not delete the user from Atlas. |
71 changes: 71 additions & 0 deletions
71
source/includes/sdk-examples/users/create-delete-users-delete-users-from-atlas.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
.. tabs-drivers:: | ||
|
||
tabs: | ||
- id: cpp-sdk | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/api.cpp | ||
:language: cpp | ||
|
||
- id: csharp | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/dotnet/WorkWithRealm.snippet.delete-user.cs | ||
:language: csharp | ||
|
||
- id: dart | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.delete-user.dart | ||
:language: dart | ||
|
||
- id: java | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/api.java | ||
:language: java | ||
|
||
- id: java-kotlin | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt | ||
:language: kotlin | ||
|
||
- id: javascript | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/node/authenticate.snippet.delete-user.js | ||
:language: javascript | ||
|
||
- id: kotlin | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.delete-user.kt | ||
:language: kotlin | ||
|
||
- id: objectivec | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.m | ||
:language: objectivec | ||
|
||
- id: swift | ||
content: | | ||
|
||
**Async/Await** | ||
|
||
.. literalinclude:: /examples/generated/code/start/DeleteUsers.snippet.async-await-delete-user.swift | ||
:language: swift | ||
:copyable: false | ||
|
||
**Closure-Style** | ||
|
||
.. literalinclude:: /examples/generated/code/start/DeleteUsers.snippet.closure-delete-user.swift | ||
:language: swift | ||
:copyable: false | ||
|
||
- id: typescript | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/node/authenticate.snippet.delete-user.js | ||
:language: typescript |
62 changes: 62 additions & 0 deletions
62
...ce/includes/sdk-examples/users/create-delete-users-remove-users-from-device.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.. tabs-drivers:: | ||
|
||
tabs: | ||
- id: cpp-sdk | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/api.cpp | ||
:language: cpp | ||
|
||
- id: csharp | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.cs | ||
:language: csharp | ||
|
||
- id: dart | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.dart | ||
:language: dart | ||
|
||
- id: java | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.java | ||
:language: java | ||
|
||
- id: java-kotlin | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt | ||
:language: kotlin | ||
|
||
- id: javascript | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.js | ||
:language: javascript | ||
|
||
- id: kotlin | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.remove-user.kt | ||
:language: kotlin | ||
|
||
- id: objectivec | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.m | ||
:language: objectivec | ||
|
||
- id: swift | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.swift | ||
:language: swift | ||
|
||
- id: typescript | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/example.ts | ||
:language: typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,8 @@ Offline Login | |
|
||
Refresh Token Expiration | ||
------------------------ | ||
|
||
.. _sdks-logout: | ||
|
||
Log a User Out | ||
-------------- |
Oops, something went wrong.