couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [14/51] [abbrv] futon commit: updated refs/heads/import-master to 53a86dd
Date Thu, 31 Jul 2014 21:43:04 GMT
admins can always read all doc fields, regardless of public_fields

Closes COUCHDB-1888


Project: http://git-wip-us.apache.org/repos/asf/couchdb-futon/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-futon/commit/4f267dfe
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-futon/tree/4f267dfe
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-futon/diff/4f267dfe

Branch: refs/heads/import-master
Commit: 4f267dfe24b8935970601b58f0fdbad16c14d061
Parents: aabb53d
Author: Jan Lehnardt <jan@apache.org>
Authored: Wed Sep 25 17:40:14 2013 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Thu Oct 3 17:58:25 2013 +0200

----------------------------------------------------------------------
 script/test/users_db_security.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-futon/blob/4f267dfe/script/test/users_db_security.js
----------------------------------------------------------------------
diff --git a/script/test/users_db_security.js b/script/test/users_db_security.js
index 888ed00..9bf9b8a 100644
--- a/script/test/users_db_security.js
+++ b/script/test/users_db_security.js
@@ -168,7 +168,7 @@ couchTests.users_db_security = function(debug) {
         "should not_found opening another user's user doc");
 
 
-      // save a db amin 
+      // save a db admin
       var benoitcDoc = {
         _id: "org.couchdb.user:benoitc",
         type: "user",
@@ -320,7 +320,7 @@ couchTests.users_db_security = function(debug) {
       {
         section: "couch_httpd_auth",
         key: "public_fields",
-        value: "name,type"
+        value: "name"
       },
       {
         section: "couch_httpd_auth",
@@ -342,6 +342,13 @@ couchTests.users_db_security = function(debug) {
         TEquals("forbidden", e.error, "should throw");
       }
 
+      // COUCHDB-1888 make sure admins always get all fields
+      TEquals(true, CouchDB.login("jan", "apple").ok);
+      var all_admin = usersDb.allDocs({ include_docs: "true" });
+      TEquals("user", all_admin.rows[2].doc.type,
+          "should return type");
+
+
       // log in one last time so run_on_modified_server can clean up the admin account
       TEquals(true, CouchDB.login("jan", "apple").ok);
     });


Mime
View raw message