dbeniteza opened a new issue, #4642:
URL: https://github.com/apache/couchdb/issues/4642

   Hello,
   
   I've found an error on the documentation section [1.5.2.2. Creating a New 
User](https://docs.couchdb.org/en/stable/intro/security.html#creating-a-new-user).
   
   It is said "_Creating a new user is a very trivial operation. You just need 
to do a [PUT](https://tools.ietf.org/html/rfc7231#section-4.3.4) request with 
the user’s data to CouchDB_"
   
   This is wrong, since the PUT method will try to create the _users database. 
The correct HTTP method is POST.
   
   Please correct this typo in the documentation.
   
   As a suggestion, it would help to explicitly include in this documentation 
section that this call must be done with an admin user. Consider including in 
the curl example something like this:
   ```
   curl -X **POST** 
<admin_user>:<admin_password>@localhost:5984/_users/org.couchdb.user:jan \
        -H "Accept: application/json" \
        -H "Content-Type: application/json" \
        -d '{"name": "jan", "password": "apple", "roles": [], "type": "user"}'
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to