aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2014-06-18 11:01:57 +0200
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2016-01-27 01:50:40 +0100
commit07fdaff191aa7ee151eeb9aa34fcf9a07cb922a9 (patch)
tree46362dbc610b4cadbe4fb7c65a10216171b8a807
parentfbbd3bdaafc0bd442a9120bf4eebb9fbdcaca8fd (diff)
downloadecs2-07fdaff191aa7ee151eeb9aa34fcf9a07cb922a9.tar.gz
ecs2-07fdaff191aa7ee151eeb9aa34fcf9a07cb922a9.zip
Check for authenticated participants first.
-rw-r--r--app/controllers/application_controller.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 109e951..913ca5f 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -67,6 +67,12 @@ class ApplicationController < ActionController::Base
protected
def authentication
+ # authenticated participants
+ auth_id, participant = authenticated_participant
+ if participant
+ logger.info "X-EcsAuthId: #{auth_id} -- Participant-ID: #{participant.id}"
+ return @participant= participant
+ end
if ECS_CONFIG["participants"]["allow_anonymous"]
# new anonymous participant
if new_anonymous_participant?
@@ -80,12 +86,6 @@ protected
return @participant = participant
end
end
- # authenticated participants
- auth_id, participant = authenticated_participant
- if participant
- logger.info "X-EcsAuthId: #{auth_id} -- Participant-ID: #{participant.id}"
- return @participant= participant
- end
end
def new_anonymous_participant?