gpt4 book ai didi

couchdb - 如何在没有应用程序层的 CouchDB 中为每个新用户创建一个新数据库

转载 作者:行者123 更新时间:2023-12-01 04:05:20 24 4
gpt4 key购买 nike

我正面临“如何在 CouchDB 中保持私有(private)用户数据的私密性”挑战。 couchdb wiki 上的详细信息:http://wiki.apache.org/couchdb/PerDocumentAuthorization

我选择为每个用户创建一个新数据库,因为这最适合我正在创建的应用程序,并且社区有很多建议可以走这条路。

我很难弄清楚如何做到这一点。在 CouchDB 中有内置的方法吗?到目前为止,我对中间层或应用程序层没有其他需要,并且希望将其保留为纯粹的沙发 + htmll5 应用程序。对此的最佳案例实践是什么?

最佳答案

一个 new feature将添加对每个用户自动创建/删除数据库的支持。

以下部分将添加到 default.inilocal.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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com