Repository: couchdb-fauxton Updated Branches: refs/heads/master 5d2fdcc8e -> 26c9a05d1
Add API URL option to permissions page This adds the API URL header link to the permissions page which opens the /db/_security endpoint and appropriate doc link. N.B. none of the doc links seem to be working on couch 2.0. Separate issue. Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/26c9a05d Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/26c9a05d Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/26c9a05d Branch: refs/heads/master Commit: 26c9a05d1ab4a77f8fdce145d2575b4473010137 Parents: 5d2fdcc Author: Ben Keen <ben.k...@gmail.com> Authored: Mon Mar 23 11:57:04 2015 -0700 Committer: Ben Keen <ben.k...@gmail.com> Committed: Tue Mar 31 11:08:55 2015 -0700 ---------------------------------------------------------------------- app/addons/permissions/resources.js | 4 +++- app/addons/permissions/routes.js | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/26c9a05d/app/addons/permissions/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/resources.js b/app/addons/permissions/resources.js index 501bd29..de89e12 100644 --- a/app/addons/permissions/resources.js +++ b/app/addons/permissions/resources.js @@ -14,7 +14,7 @@ define([ 'app', 'api' ], -function (app, FauxtonAPI ) { +function (app, FauxtonAPI) { var Permissions = FauxtonAPI.addon(); Permissions.Security = Backbone.Model.extend({ @@ -35,6 +35,8 @@ function (app, FauxtonAPI ) { return window.location.origin + '/' + this.database.safeID() + '/_security'; }, + documentation: FauxtonAPI.constants.DOC_URLS.DB_PERMISSION, + addItem: function (value, type, section) { var sectionValues = this.get(section); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/26c9a05d/app/addons/permissions/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/routes.js b/app/addons/permissions/routes.js index fc4bc83..9b631df 100644 --- a/app/addons/permissions/routes.js +++ b/app/addons/permissions/routes.js @@ -44,6 +44,10 @@ function (app, FauxtonAPI, Databases, Permissions, BaseRoute) { this.addSidebar('permissions'); }, + apiUrl: function () { + return [this.security.url('apiurl'), this.security.documentation]; + }, + establish: function () { return [ this.database.fetch(),