diff options
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r-- | app/controllers/sessions_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 66ace16400a..afbadc7f4ac 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -16,6 +16,8 @@ class SessionsController < Devise::SessionsController include GoogleSyndicationCSP include PreferredLanguageSwitcher include SkipsAlreadySignedInMessage + include AcceptsPendingInvitations + extend ::Gitlab::Utils::Override skip_before_action :check_two_factor_requirement, only: [:destroy] skip_before_action :check_password_expiration, only: [:destroy] @@ -78,6 +80,8 @@ class SessionsController < Devise::SessionsController flash[:notice] = nil end + accept_pending_invitations + log_audit_event(current_user, resource, with: authentication_method) log_user_activity(current_user) end @@ -94,6 +98,13 @@ class SessionsController < Devise::SessionsController private + override :after_pending_invitations_hook + def after_pending_invitations_hook + member = resource.members.last + + store_location_for(:user, member.source.activity_path) if member + end + def captcha_enabled? request.headers[CAPTCHA_HEADER] && helpers.recaptcha_enabled? end |