aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-06-13 19:23:20 +0900
committerrhenium <re4k@re4k.info>2013-06-13 19:23:20 +0900
commit772d5ec73dbd4c05e8e41f83b3ca9e9b2c23603e (patch)
tree8fc21386be75ab90df08276219f9cb21b56c7788 /app
parent346fe0017a7085314d844965dee17a8d05930192 (diff)
downloadaclog-772d5ec73dbd4c05e8e41f83b3ca9e9b2c23603e.tar.gz
add ApplicationController#authorized_to_show_user? spec
Diffstat (limited to 'app')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e72362d..4da5b86 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base
true
elsif request.headers["X-Verify-Credentials-Authorization"]
# OAuth Echo
- user_id = authenticate_with_twitter_oauth_echo
+ user_id = authenticate_with_twitter_oauth_echo rescue false
account = Account.find_by(user_id: user_id)
if account && (account.user_id == user.id || account.following?(user.id))
true