Skip to content

Commit

Permalink
Restrict access to /oauth/applications. Eventually, this should be a
Browse files Browse the repository at this point in the history
page that everyone can access, but can only configure their own
applications.
  • Loading branch information
jfly committed May 24, 2015
1 parent 303c1f6 commit 47750ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This repository contains all of the code that runs on [worldcubeassociation.org]
- `time ssh -A root@staging.worldcubeassociation.org 'bash <(wget --no-check-certificate -O - https://raw.githubusercontent.com/cubing/worldcubeassociation.org/master/scripts/wca-bootstrap.sh) staging/production'`

## Deploy
- TODO
- TODO - see rebuild_rails in `scripts/regulations.sh`
- `ssh staging.worldcubeassociation.org pkill -U gjcomps -f rails`

## Secrets
Expand Down
8 changes: 3 additions & 5 deletions WcaOnRails/config/initializers/doorkeeper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
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
redirect_to new_user_session_url unless current_user && current_user.admin?
end

# Authorization Code expiration time (default 10 minutes).
# authorization_code_expires_in 10.minutes
Expand Down

0 comments on commit 47750ae

Please sign in to comment.