bullet_train-integrations 1.2.10 → 1.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 889a2ff260a089eeb5d35ee3b4f7aed9382a71c64e7a05b5bae8ff6d4444a9a2
4
- data.tar.gz: 176a107590d8521a9418d0f1f2572c4bdf98cf9858129824a298fdd2a15fbf09
3
+ metadata.gz: 68a541815a66e8a52625c98f1a76733ca9d2c064c4f3ca857d49226927e109a0
4
+ data.tar.gz: 602abf81e7410155c835044fb9003c1c11c54f6daed40259ba23953883dae14b
5
5
  SHA512:
6
- metadata.gz: 682e9b2979ff8060709d5b42cd97f4d0a947907c57f2277325636082425eadbeed0d8a6dd2d981bf7d9e4d0460af9438b903d811528a58e511398eed7d48ecae
7
- data.tar.gz: 884063ea2b5cafd873a974813c87d06802fe5a1b7e25046cb8840d4fe4eea34c92b6fb5b51df26e8c55422f0dc6ba5322da715da412d6736eb68228e7a87f054
6
+ metadata.gz: 3615749e03b544c3d1112acc7dcf3657a5f30f49305d8f47ef5eb0d0d47238e7429843a6c0c0c3d03081e15d9483f921fdc4c479728628f2ff019d7a62737343
7
+ data.tar.gz: f877dde5515be9a1ad7b9c5a0eacf506a496739ea7964cc4114a5a6927d798318953a24ad08ed606fd416ee8ba3e7181c3ca90c51b86b6b38fbe2d721fd0991a
@@ -149,4 +149,22 @@ module Account::Oauth::OmniauthCallbacks::ControllerBase
149
149
  redirect_to new_user_session_path, notice: t("omniauth.user.account_not_found", provider: t(auth.provider))
150
150
  end
151
151
  end
152
+
153
+ private
154
+
155
+ def handle_outstanding_invitation
156
+ # was this user registering to claim an invitation?
157
+ if session[:invitation_uuid].present?
158
+
159
+ # try to find the invitation, if it still exists.
160
+ invitation = Invitation.find_by_uuid(session[:invitation_uuid])
161
+
162
+ # if the invitation was found, claim it for this user.
163
+ invitation&.accept_for(current_user)
164
+
165
+ # remove the uuid from the session.
166
+ session.delete(:invitation_uuid)
167
+
168
+ end
169
+ end
152
170
  end
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Integrations
3
- VERSION = "1.2.10"
3
+ VERSION = "1.2.11"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.10
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-31 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails