Closed akdasa closed 3 months ago
Update migration script to:
_admin
library
_design/permissions
validate_doc_update
contentManager
User should not be able to create new documents:
curl -X POST http://localhost:5984/library \ -H "Content-Type: application/json" \ -d '{"title": "Example Book", "author": "John Doe", "year": 2023}'
User should be able to access documents
curl -X GET http://database:5984/library/_all_docs
Admin should be able to create documents via CouchDB admin panel
Updated migration script. Will be applied to PROD once we start public alpha testing.
Implementation plan:
Update migration script to:
_admin
role from the members group fromlibrary
database._design/permissions
document withvalidate_doc_update
function to thelibrary
database to check if user has one of the following roles:_admin
,contentManager
.Acceptance criteria:
User should not be able to create new documents:
User should be able to access documents
Admin should be able to create documents via CouchDB admin panel
Related docs: