ocean-rails 5.0.4 → 5.0.5

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
  SHA1:
3
- metadata.gz: 6adcceec6a0b514e278387c8f3e12c31d9fe7699
4
- data.tar.gz: 40c361542d3464513a9cf9d5ee4ab8031834a6c5
3
+ metadata.gz: ca4e23471fde5ba07b9b4b146a085ca72b341d01
4
+ data.tar.gz: 9e704d3e8cd476b2c36c14b4394c2494df7fcb73
5
5
  SHA512:
6
- metadata.gz: 67e391bc47c90d4d0310d8f6ca33af78cd103561c52c5c4eafd307aedb0c8df2b99576bb37071356f2c86153968a294e2113462af070e2fc428bde3679864588
7
- data.tar.gz: b40aa8790f913a1615c4d96656f4647bf881dfd4adc2ac0fb6f9e6ba77fdeff49839d4f5f56838009d652c9d28212c05877921fc89029caf02df78aaa32fdcc6
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
- #@auth_api_user_id = a['user_id'] # Deprecate and remove
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
- id_or_uri = obj.created_by.is_a?(Integer) ? @auth_api_user_id : @auth_api_user_uri
94
- obj.created_by = id_or_uri if obj.created_by.blank? || obj.created_by == 0 || obj.created_by == "0-0-0-0-0"
95
- obj.updated_by = id_or_uri
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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "5.0.4"
2
+ VERSION = "5.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.4
4
+ version: 5.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson