etrepum/couchperuser — pull request #9 by jspenc72 (2014-11-30 23:39:56+00:00)
Title: Please update master couchperuser and pull revised couchperuser.erl 

This update is on lines 100, 101 and 102.

Essentially I have created a member list and an admins list, used append to combine them into a new list and passed this list as the security object in the couch_db:set_security(db, {security object}).

It changes the default behavior to of the plugin to add each user to the "names" list of admins as well as the members. That way the userdb-hex is not writable by anyone besides that user. It may be left to the application developer to decide whether or not they will allow the authenticated user to add any additional users to the list of names. Thus allowing others to write to their database.

Tested this in Couchdb Version 1.6.1

Let me know if you have any questions.

P.S. This is my first time programming in erlang so im sure there might be a better way to implement this feature.