janl commented on code in PR #4139:
URL: https://github.com/apache/couchdb/pull/4139#discussion_r939533392


##########
src/couch/src/couch_db.erl:
##########
@@ -293,23 +303,33 @@ delete_doc(Db, Id, Revisions) ->
 open_doc(Db, IdOrDocInfo) ->
     open_doc(Db, IdOrDocInfo, []).
 
-open_doc(Db, Id, Options) ->
+open_doc(Db, Id, Options0) ->
     increment_stat(Db, [couchdb, database_reads]),
+    Options = case has_access_enabled(Db) of
+        true -> Options0 ++ [conflicts];

Review Comment:
   Original set of comments 
https://github.com/apache/couchdb/pull/3038#discussion_r475014140
   
   > I'm confused; why does a DB that has access enabled always get the 
`conflicts` option added to a doc read? I know only admins can see conflicts, 
so is this to say "if this document is conflicted, deny all per-user access 
until an admin can resolve the conflicts?"
   >[...]
   >this is so we can deny access to a doc if the two edit branches disagree on 
who should have access, the doc becomes admin-only then.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to