Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge branch '1888-fix-user-fields-disabled-for-admins'
* 1888-fix-user-fields-disabled-for-admins:
  admins can always read all doc fields, regardless of public_fields
  • Loading branch information
janl committed Oct 3, 2013
2 parents 45f88b4 + 4f267df commit c861f2dcc442a05ed72769c41d66b26f0518e75d
Showing 1 changed file with 9 additions and 2 deletions.
@@ -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);
});

0 comments on commit c861f2d

Please sign in to comment.