debian-mirror-gitlab/app/controllers/concerns/accepts_pending_invitations.rb
2018-11-08 19:23:39 +05:30

15 lines
381 B
Ruby

module AcceptsPendingInvitations
extend ActiveSupport::Concern
def accept_pending_invitations
return unless resource.active_for_authentication?
clear_stored_location_for_resource if resource.accept_pending_invitations!.any?
end
def clear_stored_location_for_resource
session_key = stored_location_key_for(resource)
session.delete(session_key)
end
end