bbmb 2.2.0 → 2.2.1
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/History.txt +5 -0
- data/lib/bbmb/html/util/session.rb +1 -1
- data/lib/bbmb/model/customer.rb +1 -1
- data/lib/bbmb/util/server.rb +8 -3
- data/lib/bbmb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b33b06bdc40e8e375f2cb467bad60696906bd5
|
4
|
+
data.tar.gz: 24fe53d831147f6efdc76eb012bd105c8ef3b780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 936dbe0717e852eb213a1b7f2d8c71f03c832b73958be9ded5205461478efc391675018aafbe538b00e243262ee38d804cb8bec1d821b21acf50ced53783b755
|
7
|
+
data.tar.gz: 44ca2e4e4488f7fa689198e8a9e5246e93afe7105d6abc648f75fe7089a0e1a99abc4279a91525a6a6ce1e54bce0dd37d27dd9cfc68bfe5628a3093b3db7dc45
|
data/History.txt
CHANGED
@@ -38,7 +38,7 @@ class Session < SBSM::Session
|
|
38
38
|
def logout
|
39
39
|
SBSM.info "BBMB::Html::Util::Session logout @auth_session #{@auth_session.class}"
|
40
40
|
$stdout.sync = true
|
41
|
-
|
41
|
+
BBMB.auth.logout(@user.auth_session) if(@user.respond_to?(:auth_session))
|
42
42
|
super
|
43
43
|
end
|
44
44
|
|
data/lib/bbmb/model/customer.rb
CHANGED
@@ -70,7 +70,7 @@ class Customer
|
|
70
70
|
return if @email.eql?(email)
|
71
71
|
email = email.encode('UTF-8')
|
72
72
|
## notify the server of this change, as it affects the user-data
|
73
|
-
BBMB.server.rename_user(@email, email)
|
73
|
+
BBMB.server.rename_user(customer_id, @email, email)
|
74
74
|
@email = email
|
75
75
|
end
|
76
76
|
end
|
data/lib/bbmb/util/server.rb
CHANGED
@@ -43,11 +43,16 @@ module BBMB
|
|
43
43
|
def inject_order(customer_id, products, infos, opts={})
|
44
44
|
@app.inject_order(customer_id, products, infos, opts)
|
45
45
|
end
|
46
|
-
def rename_user(old_name, new_name)
|
46
|
+
def rename_user(customer_id, old_name, new_name)
|
47
47
|
return if old_name.eql?(new_name)
|
48
48
|
BBMB.auth.autosession(BBMB.config.auth_domain) do |session|
|
49
|
-
if(old_name.nil?)
|
50
|
-
|
49
|
+
if (old_name.nil?)
|
50
|
+
begin
|
51
|
+
session.create_entity(new_name)
|
52
|
+
rescue => error
|
53
|
+
raise error if Model::Customer.odba_extent.find {|x| x.email && x.email.index(new_name) }
|
54
|
+
SBSM.info("Skip session.create_entity for customer #{customer_id} as we found no customer with e-mail #{new_name}")
|
55
|
+
end
|
51
56
|
else
|
52
57
|
session.rename(old_name, new_name)
|
53
58
|
end
|
data/lib/bbmb/version.rb
CHANGED