作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正面临“如何在 CouchDB 中保持私有(private)用户数据的私密性”挑战。 couchdb wiki 上的详细信息:http://wiki.apache.org/couchdb/PerDocumentAuthorization
我选择为每个用户创建一个新数据库,因为这最适合我正在创建的应用程序,并且社区有很多建议可以走这条路。
我很难弄清楚如何做到这一点。在 CouchDB 中有内置的方法吗?到目前为止,我对中间层或应用程序层没有其他需要,并且希望将其保留为纯粹的沙发 + htmll5 应用程序。对此的最佳案例实践是什么?
最佳答案
一个 new feature将添加对每个用户自动创建/删除数据库的支持。
以下部分将添加到 default.ini
和 local.ini
:
[couch_peruser]
; If enabled, couch_peruser ensures that a private per-user database
; exists for each document in _users. These databases are writable only
; by the corresponding user. Databases are in the following form:
; userdb-{hex encoded username}
enable = true
; If set to true and a user is deleted, the respective database gets
; deleted as well.
delete_dbs = true
关于couchdb - 如何在没有应用程序层的 CouchDB 中为每个新用户创建一个新数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9862051/
我是一名优秀的程序员,十分优秀!