Browse Source

Restrict access to oauth/applications to admins only

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
720d1f8f3d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      config/initializers/doorkeeper.rb

+ 1
- 1
config/initializers/doorkeeper.rb View File

@ -15,7 +15,7 @@ Doorkeeper.configure do
# 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
current_user || redirect_to(new_user_session_url)
(current_user && current_user.admin?) || redirect_to(new_user_session_url)
end
# Authorization Code expiration time (default 10 minutes).

Loading…
Cancel
Save