couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [2/2] couchdb commit: updated refs/heads/master to f6a1dc5
Date Thu, 17 Apr 2014 15:38:03 GMT
Add Roles to _all_docs for _reader, _admin, _writer


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

Branch: refs/heads/master
Commit: c97b453760f08ce5c282f4be468657b2a143a902
Parents: 74238d0
Author: suelockwood <deathbear@apache.org>
Authored: Thu Apr 17 11:36:35 2014 -0400
Committer: suelockwood <deathbear@apache.org>
Committed: Thu Apr 17 11:37:54 2014 -0400

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/routes.js | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c97b4537/src/fauxton/app/addons/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/routes.js b/src/fauxton/app/addons/documents/routes.js
index 5497a30..d574588 100644
--- a/src/fauxton/app/addons/documents/routes.js
+++ b/src/fauxton/app/addons/documents/routes.js
@@ -90,7 +90,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       database = this.database;
 
       doc.copy(newId).then(function () {
-        doc.set({_id: newId}); 
+        doc.set({_id: newId});
         docView.forceRender();
         FauxtonAPI.navigate('/database/' + database.safeID() + '/' + app.utils.safeURLName(newId),
{trigger: true});
         FauxtonAPI.addNotification({
@@ -143,7 +143,11 @@ function(app, FauxtonAPI, Documents, Databases) {
     layout: "with_tabs_sidebar",
     selectedHeader: "Databases",
     routes: {
-      "database/:database/_all_docs(:extra)": "allDocs", 
+
+      "database/:database/_all_docs(:extra)": {
+        route: "allDocs",
+        roles: ["_reader","_writer","_admin"]
+      },
       "database/:database/_design/:ddoc/_view/:view": {
         route: "viewFn",
         roles: ['_admin']
@@ -198,7 +202,7 @@ function(app, FauxtonAPI, Documents, Databases) {
     },
 
     /*
-    * docParams are the options collection uses to fetch from the server 
+    * docParams are the options collection uses to fetch from the server
     * urlParams are what are shown in the url and to the user
     * They are not the same when paginating
     */
@@ -266,7 +270,7 @@ function(app, FauxtonAPI, Documents, Databases) {
           pageSize: this.getDocPerPageLimit(urlParams, parseInt(docParams.limit, 10))
         }
       });
-     
+
       this.viewEditor = this.setView("#dashboard-upper-content", new Documents.Views.ViewEditor({
         model: this.data.database,
         ddocs: this.data.designDocs,
@@ -281,7 +285,7 @@ function(app, FauxtonAPI, Documents, Databases) {
 
       this.documentsView = this.createViewDocumentsView({
         designDoc: decodeDdoc,
-        docParams: docParams, 
+        docParams: docParams,
         urlParams: urlParams,
         database: this.data.database,
         indexedDocs: this.data.indexedDocs,
@@ -308,7 +312,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       };
     },
 
-    createViewDocumentsView: function (options) { 
+    createViewDocumentsView: function (options) {
 
       return this.setView("#dashboard-lower-content", new Documents.Views.AllDocsList({
         database: options.database,
@@ -374,7 +378,7 @@ function(app, FauxtonAPI, Documents, Databases) {
         if (!this.documentsView) {
           this.documentsView = this.createViewDocumentsView({
             designDoc: ddoc,
-            docParams: docParams, 
+            docParams: docParams,
             urlParams: urlParams,
             database: this.data.database,
             indexedDocs: this.indexedDocs,
@@ -453,7 +457,7 @@ function(app, FauxtonAPI, Documents, Databases) {
         } else {
           storedPerPage = parseInt(storedPerPage, 10);
         }
-      } 
+      }
 
       if (!urlParams.limit || urlParams.limit > storedPerPage) {
         return parseInt(storedPerPage, 10);


Mime
View raw message