couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 60da46d
Date Wed, 29 Oct 2014 16:17:35 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master a021dd641 -> 60da46ddc


Small copy and auth fixes


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

Branch: refs/heads/master
Commit: 60da46ddc3c2382b25896c5462ce949887f0d227
Parents: a021dd6
Author: Garren Smith <garren.smith@gmail.com>
Authored: Thu Sep 4 08:37:28 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Wed Oct 29 18:17:21 2014 +0200

----------------------------------------------------------------------
 app/addons/auth/resources.js             |  2 ++
 app/addons/auth/templates/login.html     |  2 +-
 app/addons/databases/routes.js           |  2 ++
 app/addons/documents/routes-documents.js | 12 ++++++------
 4 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/60da46dd/app/addons/auth/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/resources.js b/app/addons/auth/resources.js
index ef6cce2..0327a3a 100644
--- a/app/addons/auth/resources.js
+++ b/app/addons/auth/resources.js
@@ -77,6 +77,7 @@ function (app, FauxtonAPI, CouchdbSession) {
     isAdminParty: function () {
       var userCtx = this.get('userCtx');
 
+
       if (!userCtx.name && userCtx.roles.indexOf("_admin") > -1) {
         return true;
       }
@@ -87,6 +88,7 @@ function (app, FauxtonAPI, CouchdbSession) {
     isLoggedIn: function () {
       var userCtx = this.get('userCtx');
 
+      if (!userCtx) { return false;}
       if (userCtx.name) {
         return true;
       }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/60da46dd/app/addons/auth/templates/login.html
----------------------------------------------------------------------
diff --git a/app/addons/auth/templates/login.html b/app/addons/auth/templates/login.html
index e73da8c..d5bc6d7 100644
--- a/app/addons/auth/templates/login.html
+++ b/app/addons/auth/templates/login.html
@@ -14,7 +14,7 @@ the License.
 <div class="span12">
   <form id="login">
     <p class="help-block">
-      Login to CouchDB with your name and password.
+      Login with your username and password
     </p>
     <input id="username" type="text" name="name" placeholder="Username" size="24" />
     <br/>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/60da46dd/app/addons/databases/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/routes.js b/app/addons/databases/routes.js
index ebfcdfe..a715b3a 100644
--- a/app/addons/databases/routes.js
+++ b/app/addons/databases/routes.js
@@ -36,6 +36,8 @@ function(app, FauxtonAPI, Databases, Views) {
       "_all_dbs(:params)": "allDatabases"
     },
 
+    roles: ['fx_loggedIn'],
+
     selectedHeader: "Databases",
 
     initialize: function() {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/60da46dd/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index 013a26d..80998e2 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -51,27 +51,27 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases,
Resou
 
       "database/:database/_all_docs(:extra)": {
         route: "allDocs",
-        roles: ["_reader","_writer","_admin"]
+        roles: ["fx_loggedIn"]
       },
       "database/:database/_design/:ddoc/_views/:view": {
         route: "viewFn",
-        roles: ['_admin']
+        roles: ['fx_loggedIn']
       },
       "database/:database/_design/:ddoc/_lists/:fn": {
         route: "tempFn",
-        roles: ['_admin']
+        roles: ['fx_loggedIn']
       },
       "database/:database/_design/:ddoc/_filters/:fn": {
         route: "tempFn",
-        roles: ['_admin']
+        roles: ['fx_loggedIn']
       },
       "database/:database/_design/:ddoc/_show/:fn": {
         route: "tempFn",
-        roles: ['_admin']
+        roles: ['fx_loggedIn']
       },
       "database/:database/_design/:ddoc/metadata": {
         route: "designDocMetadata",
-        roles: ['_admin']
+        roles: ['fx_loggedIn']
       },
       "database/:database/new_view": "newViewEditor",
       "database/:database/new_view/:designDoc": "newViewEditor",


Mime
View raw message