You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/07/31 23:43:04 UTC

[14/51] [abbrv] futon commit: updated refs/heads/import-master to 53a86dd

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 <ja...@apache.org>
Authored: Wed Sep 25 17:40:14 2013 +0200
Committer: Jan Lehnardt <ja...@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);
     });