dscf-marketplace 0.13.12 → 0.13.13
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4a2b0e347680bb877dbcce80829d80bddb751cd5248a674db3208ba169f4824
|
|
4
|
+
data.tar.gz: 450244b5f6bb3bfe6933dc5bcbe6ec1ce9a0e4cf12d2b6ba38fbba64451c3009
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c541d060329f90f173c4489da2991aa8e7ec95edd1eaf71cdea683ac6e676d2316990c24d05d8d6c85f59394b9d0a9e432164ff32449876703b61d95c0ad6c3
|
|
7
|
+
data.tar.gz: e482e00be97fae32c2b57501b9c036520ddbf385e0bc12b3290e8e687907e7da5ca8673e6778f76d132ef85d4a8f900e51abb28ac02a790a3a6eb3ef1d221496
|
|
@@ -19,8 +19,10 @@ module Dscf
|
|
|
19
19
|
# whatever Bearer token was sent — an agent onboarding a retailer
|
|
20
20
|
# on their behalf attaches their own token, so we derive the
|
|
21
21
|
# onboarding agent from it rather than trusting a client-supplied
|
|
22
|
-
# agent_id.
|
|
23
|
-
|
|
22
|
+
# agent_id. Guard on current_user first: `find_by(user_id: nil)`
|
|
23
|
+
# matches any Agent row with a null user_id, which silently
|
|
24
|
+
# attributed every anonymous self-signup to a random agent.
|
|
25
|
+
onboarding_agent = current_user && Dscf::Marketplace::Agent.find_by(user_id: current_user.id)
|
|
24
26
|
|
|
25
27
|
retailer = Dscf::Marketplace::Retailer.new(
|
|
26
28
|
name: registration_params[:name],
|