summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-03-31 11:40:44 +0200
committerAzul <azul@riseup.net>2016-03-31 11:40:44 +0200
commitbe5efb57dc9b282a31cf29c9eac27cb5a7e7ac2f (patch)
treece8bee7d2fa4007a1db9815e1af001fe44e329c1 /config
parent14c9f2ab7cbf410bcd7fdd75b4a1c11417b30bd7 (diff)
parent48acca107b9bd7a59bacb1449b042eb753e63917 (diff)
Merge remote-tracking branch 'github/211' into develop
Diffstat (limited to 'config')
-rw-r--r--config/defaults.yml11
-rw-r--r--config/routes.rb8
2 files changed, 16 insertions, 3 deletions
diff --git a/config/defaults.yml b/config/defaults.yml
index 906b446..844adaa 100644
--- a/config/defaults.yml
+++ b/config/defaults.yml
@@ -117,6 +117,9 @@ development:
<<: *common
<<: *service_levels
admins: [blue, red, staff]
+ api_tokens:
+ monitor: nil
+ admin: nil
domain: example.org
secret_token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
reraise_errors: true
@@ -128,6 +131,11 @@ test:
<<: *common
<<: *service_levels
admins: [admin, admin2]
+ api_tokens:
+ monitor: "212da28a59dcaca487365309dc93aa09"
+ admin: nil
+ allowed_ips:
+ - 0.0.0.0
domain: test.me
secret_token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
reraise_errors: true
@@ -142,6 +150,9 @@ production:
<<: *cert_options
<<: *common
admins: []
+ api_tokens:
+ monitor: nil
+ admin: nil
domain: example.net
engines:
- support
diff --git a/config/routes.rb b/config/routes.rb
index da6edce..e370aa4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -26,16 +26,18 @@ LeapWeb::Application.routes.draw do
namespace "api", { module: "v1",
path: "/1/",
- defaults: {format: 'json'} } do
- resources :sessions, :only => [:new, :create, :update],
+ defaults: {format: 'json'},
:constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/ }
+ } do
+ resources :sessions, :only => [:new, :create, :update]
delete "logout" => "sessions#destroy", :as => "logout"
- resources :users, :only => [:create, :update, :destroy, :index]
+ resources :users, :only => [:create, :update, :destroy, :index, :show]
resources :messages, :only => [:index, :update]
resource :cert, :only => [:show, :create]
resource :smtp_cert, :only => [:create]
resource :service, :only => [:show]
resources :configs, :only => [:index, :show]
+ resources :identities, :only => [:show]
end
scope "(:locale)", :locale => CommonLanguages.match_available do