about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-12 19:46:06 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-12 19:46:06 +0100
commit1aa477ac2f0e9195497899691bb5cc16a7034c01 (patch)
treec331188d6955cbdd12e78bc6ccdb2329b5dddf67 /config
parentaab9f57e369c492bad03bcf15411394897314b4d (diff)
Customized more doorkeeper views, only logged in users can create oauth apps
Diffstat (limited to 'config')
-rw-r--r--config/initializers/doorkeeper.rb10
-rw-r--r--config/routes.rb2
2 files changed, 4 insertions, 8 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index 22a379b66..69a730cac 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -14,18 +14,16 @@ Doorkeeper.configure do
   end
 
   # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
-  # admin_authenticator do
-  #   # Put your admin authentication logic here.
-  #   # Example implementation:
-  #   Admin.find_by_id(session[:admin_id]) || redirect_to(new_admin_session_url)
-  # end
+  admin_authenticator do
+    current_user || redirect_to(new_user_session_url)
+  end
 
   # Authorization Code expiration time (default 10 minutes).
   # authorization_code_expires_in 10.minutes
 
   # Access token expiration time (default 2 hours).
   # If you want to disable expiration, set this to nil.
-  # access_token_expires_in 2.hours
+  # access_token_expires_in nil
 
   # Assign a custom TTL for implicit grants.
   # custom_access_token_expires_in do |oauth_client|
diff --git a/config/routes.rb b/config/routes.rb
index 70cd20a82..d63bdf981 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -49,7 +49,5 @@ Rails.application.routes.draw do
     end
   end
 
-  get '/mentions', to: 'home#mentions', as: :mentions
-
   root 'home#index'
 end