Skip to content
Snippets Groups Projects
Commit 720d1f8f authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Restrict access to oauth/applications to admins only

parent b746a931
No related branches found
No related tags found
No related merge requests found
......@@ -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).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment