Access session information from couchdb views

I am new to couchdb / couchapp. I am wondering if _session information can be accessed from couchdb views. For instance:

function(doc) {
  if (doc.username == session.userCtx.name) {
    emit(doc.username, doc);
  }
}; 
+3
source share
1 answer

Great question! The answer is no , and it’s important to understand why.

A policy by which users can see what data is running at the database level , rather than at the document or presentation level. It sounds strange, but it makes sense in the long run.

, , . , .

_all_docs, CouchDB.

+6

Source: https://habr.com/ru/post/1795649/


All Articles