English 中文(简体)
CouchDB 全 CouchDB 全读只读访问权
原标题:CouchDB-wide read-only access rights

我需要创建一个 CouchDB 用户, 该用户只能从任何数据库读取文件, 但无法写入其中的任何文件 。 就我而言, 它不是默认支持的( 用户类型描述为 < a href=" http:// wiki.pache. org/ couchdb/ security_ Features_overview" rel= “ noreferrer" > 这里 )。

正如维基百科所说,每个数据库都有访问权, 所以看来我试图做的并不是使用CouchDB的最佳方法。

无论如何,如果能这样做,那太好了。请给我一些关于如何执行的建议。

最佳回答

您需要在每个数据库中设置一个设计文档, 以强制执行此规则。 设计文档必须有一个 < em> 验证功能 , 以检查用户是否有写权限。

这里有一章是关于""http://guide.couchdb.org/fraft/validation.html" rel="noreferrer">validation 函数 构成正式 "http://guide.couchdb.org/"rel="noreferrer">CouchDB book

更好的是, rel=“noreferr'>这里是一个验证功能,只能让行政官员修改一个 doc,并限制普通用户只读取。 https://github.com/iriscouch/manage_couchdbis_an-auchdb#asiati-validation-功能' rel=“noreferr>这里可以找到关于该功能的解释。

问题回答

暂无回答




相关问题
couchdb for /really/ distributed replica

let s say i want to implement a distributed database (each node being the replica of the others); i hear that cdb is able to easily sync between two nodes and at least support some form of conflict ...

CouchDB View, Map, Index, and Sequence

I think read somewhere that when a View is requested the "map" is only run across documents that have been added since the last time it was requested? How is this determined? I thought I saw something ...

representing a many-to-many relationship in couchDB

Let s say I m writing a log analysis application. The main domain object would be a LogEntry. In addition. users of the application define a LogTopic which describes what log entries they are ...

couchDB , python and authentication

I have installed couchDB v 0.10.0, and am attempting to talk to it via python from Couch class downloaded from couchDB wiki. Problem is: Create database mydb : { error : unauthorized , reason : ...

Temp View Caching?

I m using CouchDB with a home-grown C# interface library. The most common method of accessing CouchDB with this library results in a temp view being created. I ve optimized the library so that it uses ...

热门标签