From 1aa477ac2f0e9195497899691bb5cc16a7034c01 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 12 Mar 2016 19:46:06 +0100 Subject: Customized more doorkeeper views, only logged in users can create oauth apps --- config/initializers/doorkeeper.rb | 10 ++++------ config/routes.rb | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'config') 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 -- cgit