sync_attr_with_auth0 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sync_attr_with_auth0/model.rb +3 -3
- 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: 0d91e1f95f9164f327378ca214c38e9dc7cfeeff
|
4
|
+
data.tar.gz: 8dede277728347ddbfb18e191770f4b6cbbb1495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f10855707e6b307d3b14bb155ec8063ad66b7f11b5f75f5ae4c588bfebf57421301e91323ff10fe1e735183142fad9c82a7ce5373b48be0260fa27b21d6a3f2
|
7
|
+
data.tar.gz: 0dac005de720f5a62fc56810b41e2a531dac0c28ad50e4c83364969ee1272ea7e8407e27027781ed9d46b9e984ec6f31f71d6fb925353a5dbf41611245417cf5
|
@@ -49,7 +49,7 @@ module SyncAttrWithAuth0
|
|
49
49
|
# If the email is being modified, verify the new email does not already
|
50
50
|
# exist in auth0.
|
51
51
|
|
52
|
-
ok_to_validate = (self.respond_to?(:validate_with_auth0) ? self.validate_with_auth0 : true)
|
52
|
+
ok_to_validate = (self.respond_to?(:validate_with_auth0) and !self.validate_with_auth0.nil? ? self.validate_with_auth0 : true)
|
53
53
|
|
54
54
|
if ok_to_validate and self.email_changed?
|
55
55
|
# Get an access token
|
@@ -69,7 +69,7 @@ module SyncAttrWithAuth0
|
|
69
69
|
def create_user_in_auth0
|
70
70
|
# When creating a new user, create the user in auth0.
|
71
71
|
|
72
|
-
ok_to_sync = (self.respond_to?(:sync_with_auth0_on_create) ? self.sync_with_auth0_on_create : true)
|
72
|
+
ok_to_sync = (self.respond_to?(:sync_with_auth0_on_create) and !self.sync_with_auth0_on_create.nil? ? self.sync_with_auth0_on_create : true)
|
73
73
|
|
74
74
|
if ok_to_sync
|
75
75
|
# Get an access token
|
@@ -117,7 +117,7 @@ module SyncAttrWithAuth0
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def sync_attr_with_auth0
|
120
|
-
ok_to_sync = (self.respond_to?(:sync_with_auth0_on_update) ? self.sync_with_auth0_on_update : true)
|
120
|
+
ok_to_sync = (self.respond_to?(:sync_with_auth0_on_update) and !self.sync_with_auth0_on_update.nil? ? self.sync_with_auth0_on_update : true)
|
121
121
|
|
122
122
|
if ok_to_sync
|
123
123
|
# Look for matches between what's changing
|