You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2023/05/24 07:18:50 UTC

[james-project] 06/06: JAMES-3909 Documentation for user data deletion webadmin routes

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit cfdf2aeeda887c27d0e14f625216c5a25c0f9a85
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Fri May 19 16:45:15 2023 +0700

    JAMES-3909 Documentation for user data deletion webadmin routes
---
 .../docs/modules/ROOT/pages/operate/webadmin.adoc  | 51 +++++++++++++++++++++
 src/site/markdown/server/manage-webadmin.md        | 53 ++++++++++++++++++++++
 2 files changed, 104 insertions(+)

diff --git a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
index bf37c8343f..1a343c7d30 100644
--- a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
+++ b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
@@ -674,6 +674,57 @@ The scheduled task will have the following type `UsernameChangeTask` and the fol
 }
 ....
 
+Valid status includes:
+
+ - `SKIPPED`: bypassed via `fromStep` setting
+ - `WAITING`: Awaits execution
+ - `IN_PROGRESS`: Currently executed
+ - `FAILED`: Error encountered while executing this step. Check the logs.
+ - `ABORTED`: Won't be executed because of previous step failures.
+
+=== Delete data of a user
+
+....
+curl -XPOST http://ip:port/users/usernameToBeUsed?action=deleteData
+....
+
+Would create a task that deletes data of the user.
+
+link:#_endpoints_returning_a_task[More details about endpoints returning a task].
+
+Implemented deletion steps are:
+
+ - `RecipientRewriteTableUserDeletionTaskStep`: deletes all rewriting rules related to this user.
+ - `FilterUserDeletionTaskStep`: deletes all filters belonging to the user.
+ - `DelegationUserDeletionTaskStep`: deletes all delegations from / to the user.
+ - `MailboxUserDeletionTaskStep`: deletes mailboxes of this user, all ACLs of this user, as well as his subscriptions.
+ - `WebPushUserDeletionTaskStep`: deletes push data registered for this user.
+ - `IdentityUserDeletionTaskStep`: deletes identities registered for this user.
+ - `VacationUserDeletionTaskStep`: deletes vacations registered for this user.
+
+Response codes:
+
+* 201: Success. Corresponding task id is returned.
+* 400: Error in the request. Details can be found in the reported error.
+
+The `fromStep` query parameter allows skipping previous steps, allowing to resume the user data deletion from a failed step.
+
+The scheduled task will have the following type `DeleteUserDataTask` and the following `additionalInformation`:
+
+....
+{
+        "type": "DeleteUserDataTask",
+        "username": "jessy.jones@domain.tld",
+        "status": {
+            "A": "DONE",
+            "B": "FAILED",
+            "C": "ABORTED"
+        },
+        "fromStep": null,
+        "timestamp": "2023-02-17T02:54:01.246477Z"
+}
+....
+
 Valid status includes:
 
  - `SKIPPED`: bypassed via `fromStep` setting
diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 4f59df86d3..329cd488ad 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -310,6 +310,8 @@ Response codes:
    - [Deleting a user](#Deleting_a_user)
    - [Retrieving the user list](#Retrieving_the_user_list)
    - [Retrieving the list of allowed `From` headers for a given user](Retrieving_the_list_of_allowed_From_headers_for_a_given_user)
+   - [Change a username](#change-a-username)
+   - [Delete data of a user](#delete-data-of-a-user)
 
 ### Create a user
 
@@ -515,6 +517,57 @@ The scheduled task will have the following type `UsernameChangeTask` and the fol
 }
 ```
 
+Valid status includes:
+
+ - `SKIPPED`: bypassed via `fromStep` setting
+ - `WAITING`: Awaits execution
+ - `IN_PROGRESS`: Currently executed
+ - `FAILED`: Error encountered while executing this step. Check the logs.
+ - `ABORTED`: Won't be executed because of previous step failures.
+
+### Delete data of a user
+
+```
+curl -XPOST http://ip:port/users/usernameToBeUsed?action=deleteData
+```
+
+Would create a task that deletes data of the user.
+
+[More details about endpoints returning a task](#_endpoints_returning_a_task).
+
+Implemented deletion steps are:
+
+- `RecipientRewriteTableUserDeletionTaskStep`: deletes all rewriting rules related to this user.
+- `FilterUserDeletionTaskStep`: deletes all filters belonging to the user.
+- `DelegationUserDeletionTaskStep`: deletes all delegations from / to the user.
+- `MailboxUserDeletionTaskStep`: deletes mailboxes of this user, all ACLs of this user, as well as his subscriptions.
+- `WebPushUserDeletionTaskStep`: deletes push data registered for this user.
+- `IdentityUserDeletionTaskStep`: deletes identities registered for this user.
+- `VacationUserDeletionTaskStep`: deletes vacations registered for this user.
+
+Response codes:
+
+* 201: Success. Corresponding task id is returned.
+* 400: Error in the request. Details can be found in the reported error.
+
+The `fromStep` query parameter allows skipping previous steps, allowing to resume the user data deletion from a failed step.
+
+The scheduled task will have the following type `DeleteUserDataTask` and the following `additionalInformation`:
+
+```
+{
+        "type": "DeleteUserDataTask",
+        "username": "jessy.jones@domain.tld",
+        "status": {
+            "A": "DONE",
+            "B": "FAILED",
+            "C": "ABORTED"
+        },
+        "fromStep": null,
+        "timestamp": "2023-02-17T02:54:01.246477Z"
+}
+```
+
 Valid status includes:
 
  - `SKIPPED`: bypassed via `fromStep` setting


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org