bullet_train-integrations 1.2.10 → 1.2.12

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: 21e27cb6410cab460f8e453cfefec679f8d6e1caf4d82c4999052153339c8cda
4
+ data.tar.gz: 58ed07f1af1e6863765af041dd8840394352153bcd0f12bfcfa83bd7292266ca
5
5
  SHA512:
6
- metadata.gz: 682e9b2979ff8060709d5b42cd97f4d0a947907c57f2277325636082425eadbeed0d8a6dd2d981bf7d9e4d0460af9438b903d811528a58e511398eed7d48ecae
7
- data.tar.gz: 884063ea2b5cafd873a974813c87d06802fe5a1b7e25046cb8840d4fe4eea34c92b6fb5b51df26e8c55422f0dc6ba5322da715da412d6736eb68228e7a87f054
6
+ metadata.gz: 17bc5e1b6346b45b14192245dbfd826c91573a8c4501e7995a58741293ac454f24f52f4e8cee2f60224076b552a2218cfb4b4b13eea4e0204a34f202327c77ec
7
+ data.tar.gz: 8db201f70b067b995a8bb9c43ab2141891a9080303e149b2e121b8651ddb52be1ba636fc52681fc2558fbbb404433939d973e83904e4df273d21f7253f2f5460
@@ -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.12"
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.12
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-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails