You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/11/21 02:00:36 UTC

[james-project] 01/13: JAMES-2982 Moving user constraints out of the webadmin markdown

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

View the commit online:
https://github.com/apache/james-project/commit/c00ea1c2b85fb75397aeb97117ed4b8482b4d455

commit c00ea1c2b85fb75397aeb97117ed4b8482b4d455
Author: Tran Tien Duc <dt...@linagora.com>
AuthorDate: Mon Nov 18 14:21:01 2019 +0700

    JAMES-2982 Moving user constraints out of the webadmin markdown
---
 src/site/markdown/server/manage-webadmin.md | 10 ++--------
 src/site/xdoc/server/config-users.xml       | 16 +++++++++++++++-
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index c8c5750..746ba37 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -294,14 +294,8 @@ Response codes:
 curl -XPUT http://ip:port/users/usernameToBeUsed -d '{"password":"passwordToBeUsed"}'
 ```
 
-Resource name usernameToBeUsed:
-
- - can not be null or empty
- - can not be more than 255 characters
- - can not contain '/'
- - When virtual hosting is enabled, it should follow the format `localPart` + `@` + `domainPart`, 
- otherwise the valid format doesn't contain `@`
- 
+Resource name usernameToBeUsed representing valid users, 
+hence it should match the criteria at [User Repositories documentation](/server/config-users.html) 
 
 Response codes:
 
diff --git a/src/site/xdoc/server/config-users.xml b/src/site/xdoc/server/config-users.xml
index 11fe61d..8024dc4 100644
--- a/src/site/xdoc/server/config-users.xml
+++ b/src/site/xdoc/server/config-users.xml
@@ -33,6 +33,20 @@
 
       <p>Consult <a href="https://github.com/apache/james-project/tree/master/server/app/src/main/resources/usersrepository.xml">usersrepository.xml</a> in GIT to get some examples and hints.</p>
 
+      <p>
+        A user has two attributes: username and password. A valid user should satisfy these criteria:
+      </p>
+      <ul>
+        <li>username and password cannot be null or empty</li>
+        <li>username should not be longer than 255 characters</li>
+        <li>username can not contain '/'</li>
+        <li>username can not contain multiple domain delimiter('@')</li>
+        <li>A username can have only a local part when virtualHosting is disabled. E.g.'myUser'</li>
+        <li>
+            When virtualHosting is enabled, a username should have a domain part,
+            and the domain part should be concatenated after a domain delimiter('@'). E.g. 'myuser@james.org'
+        </li>
+      </ul>
     </subsection>
 
     <subsection name="General configuration">
@@ -43,7 +57,7 @@
         <dt><strong>enableVirtualHosting</strong></dt>
         <dd>true or false. Add domain support for users (default: false, except for Cassandra Users Repository)</dd>
         <dt><strong>administratorId</strong></dt>
-        <dd>user's name. Allow an user to access to the <a href="https://tools.ietf.org/html/rfc4616#section-2">impersonation command</a>, acting on the behalf of any user.</dd>
+        <dd>user's name. Allow a user to access to the <a href="https://tools.ietf.org/html/rfc4616#section-2">impersonation command</a>, acting on the behalf of any user.</dd>
       </dl>
 
     </subsection>


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