ocean-rails 5.0.4 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/ocean_application_controller.rb +8 -4
- data/lib/ocean/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: ca4e23471fde5ba07b9b4b146a085ca72b341d01
|
4
|
+
data.tar.gz: 9e704d3e8cd476b2c36c14b4394c2494df7fcb73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 163837a7f29c54cd0b729c6a5f6f659ae6864d9ba4a72c1277e92bfb4ed0c81fe2579ff556e963e7595015c5d04f9217cf514eac15e1bc2ab1b8c470ea82e90f
|
7
|
+
data.tar.gz: f9331257c572927c2438cf212997426aef3b136094c38845a67c1d782d993c54d5d5a34ef559ed05bb9688ce015619fb97d93d2c519206c57b138f34a7eb61ff
|
@@ -68,7 +68,7 @@ module OceanApplicationController
|
|
68
68
|
response = Api.permitted?(@x_api_token, query: qs)
|
69
69
|
if response.status == 200
|
70
70
|
a = response.body['authentication']
|
71
|
-
|
71
|
+
@auth_api_user_id = a['user_id'] # Deprecate and remove
|
72
72
|
@auth_api_user_uri = a['_links']['creator']['href'] # Keep
|
73
73
|
Thread.current[:username] = a['username']
|
74
74
|
@right_restrictions = a['right']
|
@@ -90,9 +90,13 @@ module OceanApplicationController
|
|
90
90
|
# Integer, to their internal SQL ID.)
|
91
91
|
#
|
92
92
|
def set_updater(obj)
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
if obj.created_by.is_a?(Integer)
|
94
|
+
obj.created_by = @auth_api_user_id if obj.created_by.blank? || obj.created_by == 0
|
95
|
+
obj.updated_by = @auth_api_user_id
|
96
|
+
else
|
97
|
+
obj.created_by = @auth_api_user_uri if obj.created_by.blank? || obj.created_by == "0"
|
98
|
+
obj.updated_by = @auth_api_user_uri
|
99
|
+
end
|
96
100
|
end
|
97
101
|
|
98
102
|
|
data/lib/ocean/version.rb
CHANGED