dscf-core 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/dscf/core/auth_controller.rb +6 -2
- data/lib/dscf/core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04dc0626657988f601694e4e423b72fbc82996d6960178bc52024aa1de41bfe8
|
|
4
|
+
data.tar.gz: 9270c931ab649cf64b2265e0680ea36cdea14c85cb7d73439e66035a4336bae1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 369e0eb673118c48fafb0c41ab308a926cda01ba05348047db3907fa988ca569185c9f5c899f9a5d560ed728271b2bc273baed41abe2a62695eca5171d52ef88
|
|
7
|
+
data.tar.gz: fa2cc032c4fb2ce73478517a353896dd03dc36717a05839b8fde475308d41215d0b396cde8aa935a1fed48ffe9b5b437909c067a5548434d048fed3ce808fbd0
|
|
@@ -161,8 +161,12 @@ module Dscf
|
|
|
161
161
|
# agent from it rather than trusting a client-supplied agent_id
|
|
162
162
|
# (there is none in this params shape today, but this keeps the
|
|
163
163
|
# same trust model as the rest of the agent-assisted flows).
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
# Guard on current_user first: find_by(user_id: nil) matches any
|
|
165
|
+
# Agent row with a null user_id, silently attributing anonymous
|
|
166
|
+
# self-signups to a random agent (confirmed live in dscf_marketplace's
|
|
167
|
+
# equivalent bug — same fix applied here).
|
|
168
|
+
onboarding_agent = if current_user && defined?(Dscf::Marketplace::Agent)
|
|
169
|
+
Dscf::Marketplace::Agent.find_by(user_id: current_user.id)
|
|
166
170
|
end
|
|
167
171
|
|
|
168
172
|
retailer = Dscf::Marketplace::Retailer.create!(
|
data/lib/dscf/core/version.rb
CHANGED