CouchDB and PouchDB plain users can create Databases -


i don't want normal users able create databases.

in futon screen /_utils, when logged in plain user, functions expected. admins can create databases.

but when sync pouchdb couchdb, plain users can create (replicate?) database. want adding of new databases restricted admin users.

also noticed existing db edited when user restricted.

how can fix this?

var remotecouch = http://testuser:testuser@{domain}.iriscouch.com/testdb;  pouchdb.debug.disable();  if (remotecouch) {     sync(); } else {     console.log("no remote server."); }  function sync() {     var opts = {live: true};     db.replicate.to(remotecouch, opts, syncerror);     db.replicate.from(remotecouch, opts, syncerror); } 

edit

testuser not in /_config/admins

testuser:

{    "_id": "org.couchdb.user:testuser",    "_rev": "1-7d28b3388a62cfca103cbe3642549bee",    "password_scheme": "pbkdf2",    "iterations": 10,    "type": "user",    "name": "testuser",    "roles": [        "testuser"    ],    "derived_key": "2181a44141d6d6aa2061bb2c5c057451acc6461e",    "salt": "2184888b099f37605feca0a22e5b6bb9" }

is couchdb in admin party mode? if it's not, admins should able create databases, whether it's via futon or pouchdb.

pouchdb isn't doing special; can simulate pouchdb doing using curl:

curl -x put http://someuser:somepassword@path.to.couchdb.com:5984/somedatabase 

are sure testuser isn't admin? if user give pouchdb admin, yes, users able create own databases.

more info on authentication can found here: https://github.com/nolanlawson/pouchdb-authentication#couchdb-authentication-recipes


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -