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 2020/12/15 01:53:00 UTC
[james-project] 06/07: JAMES-3468 Update manage webadmin documents
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 e7f1c76ec3efbc3a13b00e3f39ef14318413cf63
Author: quanth <hq...@linagora.com>
AuthorDate: Fri Dec 11 16:01:40 2020 +0700
JAMES-3468 Update manage webadmin documents
---
.../pages/distributed/operate/webadmin.adoc | 25 ++++++++++++++++------
server/protocols/webadmin-cli/README.md | 17 ++++++++++++++-
src/site/markdown/server/manage-webadmin.md | 23 +++++++++++++++++---
3 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/docs/modules/servers/pages/distributed/operate/webadmin.adoc b/docs/modules/servers/pages/distributed/operate/webadmin.adoc
index e7f79c1..c88a5e5 100644
--- a/docs/modules/servers/pages/distributed/operate/webadmin.adoc
+++ b/docs/modules/servers/pages/distributed/operate/webadmin.adoc
@@ -450,8 +450,25 @@ Response codes:
* 204: The user was successfully created
* 400: The user name or the payload is invalid
+* 409: The user name already exists
-Note: if the user exists already, its password will be updated.
+Note: If the user exists already, its password cannot be updated using this.
+If you want to update a user's password, please have a look at *Update a user password* below.
+
+=== Updating a user password
+
+....
+curl -XPUT http://ip:port/users/usernameToBeUsed?force \
+ -d '{"password":"passwordToBeUsed"}' \
+ -H "Content-Type: application/json"
+....
+
+Response codes:
+
+- 204: The user's password was successfully updated
+- 400: The user name or the payload is invalid
+
+This also can be used to create a new user.
=== Testing a user existence
@@ -468,12 +485,6 @@ Response codes:
* 400: The user name is invalid
* 404: The user does not exist
-=== Updating a user password
-
-Same than Create, but a user need to exist.
-
-If the user do not exist, then it will be created.
-
=== Deleting a user
....
diff --git a/server/protocols/webadmin-cli/README.md b/server/protocols/webadmin-cli/README.md
index 14a48b7..6ea0203 100644
--- a/server/protocols/webadmin-cli/README.md
+++ b/server/protocols/webadmin-cli/README.md
@@ -62,6 +62,7 @@ Note: the command line before ENTITY will be documented as {cli}.
- [Get the list of domains](#get-the-list-of-domains)
- [Manage Users](#manage-users)
- [Create a user](#create-a-user)
+ - [Update a user password](#update-a-user-password)
- [Test a user existence](#test-a-user-existence)
- [Delete a user](#delete-a-user)
- [Get users list](#get-users-list)
@@ -141,7 +142,21 @@ Enter value for --password (Password):
```
Resource name <username> representing valid users, hence it should match the criteria at [User Repositories documentation](https://james.apache.org/server/config-users.html)
-Note: if the user exists already, its password will be updated.
+Note: If the user exists already, its password cannot be updated using this.
+If you want to update a user's password, please have a look at [Update a user password](#update-a-user-password).
+
+### Update a user password
+
+```
+{cli} user create --force <username> --password
+```
+Then the Command Line will prompt users to enter password (password will not be printed on the screen for security):
+```
+Enter value for --password (Password):
+```
+Resource name <username> representing valid users, hence it should match the criteria at [User Repositories documentation](https://james.apache.org/server/config-users.html)
+
+Note: This also can be used to create a new user.
### Test a user existence
diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 7a5e2d5..cb6c067 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -299,8 +299,8 @@ Response codes:
## Administrating users
- [Create a user](#Create_a_user)
- - [Testing a user existence](#Testing_a_user_existence)
- [Updating a user password](#Updating_a_user_password)
+ - [Testing a user existence](#Testing_a_user_existence)
- [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)
@@ -320,10 +320,27 @@ Response codes:
- 204: The user was successfully created
- 400: The user name or the payload is invalid
+ - 409: The user name already exists
+
+Note: If the user exists already, its password cannot be updated using this.
+If you want to update a user's password, please have a look at [Update a user password](#Updating_a_user_password).
+
+### Updating a user password
+
+```
+curl -XPUT http://ip:port/users/usernameToBeUsed?force \
+ -d '{"password":"passwordToBeUsed"}' \
+ -H "Content-Type: application/json"
+```
+
+Response codes:
+
+- 204: The user's password was successfully updated
+- 400: The user name or the payload is invalid
-Note: if the user exists already, its password will be updated.
+This also can be used to create a new user.
-###Testing a user existence
+### Testing a user existence
```
curl -XHEAD http://ip:port/users/usernameToBeUsed
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org