Replies: 2 comments 5 replies
-
what did you set default.ini
|
Beta Was this translation helpful? Give feedback.
4 replies
-
nope. if not specified in the .ini file the default value is |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am building website for sharing public data using CouchDB as the backend. I want the data to be publicly accessible without logins (i.e. anonymously readable by default). But I want only designated CouchDB users (in addition to site admins) to be able to write to the databases.
So far, I was able to achieve this using the following settings
default_security = admin_only
so that everyone can readvalidate_doc_update
handler to raise an error ifuserCtx.name
is not present - preventing anonymous users to write_admin
roles for both Admins and Members for each created databaseI found that the above settings mostly do what I hoped (unless I overlooked) - anonymous users can browse, but not deleting/modifying data; couchdb users can upload/update/delete documents using their credentials. Only site admins can create new databases, modify design docs etc.
However, I found one problem - it appears that regardless if a couchdb user is assigned to a database as admin or not, any valid user can upload/update documents to such database.
I have two questions
is there a way I can limit the users who can commit changes (add, modify, delete) documents from a database to those I explicitly list under the admin? should this be explicitly implemented in thevalidate_doc_update
handler?here is a screenshot of the permission settings of one of my databases
PS: my 2nd question was solved - I modified my
validate_doc_update
handler and test the user name againstsecObj
. it now prevents anyone who is not listed under secObj to post updates.Beta Was this translation helpful? Give feedback.
All reactions