redhat_access 2.2.15 → 2.2.16

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: 9f89c7faa75f59562806c09d6c4dc210e754bcf2fe0148c3adc8e4017790df0e
4
- data.tar.gz: e775c96ab698eb7ab8cc7969f8423a1b323a749ff9a86b4adfe57addb704e059
3
+ metadata.gz: fe33c66ba4b918fd0d0a4b643075d656ba00c8f1af2efc387643d181b8b132df
4
+ data.tar.gz: 1b7c7b46ffe75f51142247eac000413b5507f343bcefbeae4d436663adc74ae2
5
5
  SHA512:
6
- metadata.gz: 84ea9bc59d80cb132a2e833ee2c47c6c38db1ede55c2fb28fd974f06c5b51fe9be3647cb1fd17b4456c8a49a3a046914f10fa25b106a6e3e39ada41364436ee7
7
- data.tar.gz: cdb8bae03acecdc24d49fe1228ad8c0fc78ccbec51389057f0c986af2e55e14454aaecf10549310edd62f846913394c2cc08e85f9fbb7e7cd1fe132352f4e9bf
6
+ metadata.gz: 2cfb18c7636c09b3e55bb16c8d848a55ff1d64c87129b0de6291121ac2da3aff83a363b679346c9bbd4dd5b347290a81a4d29aa36c96ab7d7239be9f57ecfd48
7
+ data.tar.gz: 89f7c4b1effd5629d548c82def18385e60e1357729024162daac288524b9fa9561bbdfc1bd317a496182934b82359f90bfa8b14c0f5b995ecd78ca4ec7038f9c
@@ -120,6 +120,18 @@ module RedhatAccess
120
120
  host = get_content_host(uuid)
121
121
  org = get_organization(host)
122
122
 
123
+ # {
124
+ # "Satellite": {
125
+ # "Organization": ["Insights"],
126
+ # "Location": ["North America", "RTP"]
127
+ # },
128
+ #
129
+ # "SatelliteParameter": {
130
+ # "parameter_1": ["value_1"],
131
+ # "parameter_2": ["value_2"]
132
+ # }
133
+ # }
134
+
123
135
  # get organization
124
136
  labels = [{
125
137
  :namespace => "Satellite",
@@ -15,8 +15,7 @@ module RedhatAccess
15
15
  end
16
16
 
17
17
  def can_mask_rules(user)
18
- # #TODO move this to an auth class?
19
- # TODO move this to an auth class?
18
+ 849456 # TODO move this to an auth class?
20
19
  return false if user.nil?
21
20
  return true if user.admin
22
21
  permissions = user.cached_roles.collect(&:permissions).flatten.map!(&:name)
@@ -67,7 +66,8 @@ module RedhatAccess
67
66
  def disconnected_org?(org)
68
67
  if org
69
68
  # TODO: fix hard coding
70
- org.redhat_repository_url != 'https://cdn.redhat.com'
69
+ # disable insights if disconnected orgs aren't enabled and katello doesn't point to redhat's CDN
70
+ !REDHAT_ACCESS_CONFIG[:enable_insights_for_disconnected_orgs] && org.redhat_repository_url != 'https://cdn.redhat.com'
71
71
  else
72
72
  raise(RecordNotFound, 'Organization not found or invalid')
73
73
  end
@@ -11,6 +11,7 @@
11
11
  # :telemetry_api_timeout_s : 60
12
12
  :telemetry_ssl_verify_peer : true
13
13
  :use_subsets : false
14
+ :enable_insights_for_disconnected_orgs : false
14
15
 
15
16
  :diagnostic_logs :
16
17
  - /var/log/foreman/production.log
@@ -9,6 +9,7 @@
9
9
  :telemetry_api_host : "https://cert-api.access.redhat.com"
10
10
  :telemetry_ssl_verify_peer : true
11
11
 
12
+ :enable_insights_for_disconnected_orgs : false
12
13
  :use_subsets : false
13
14
 
14
15
  :diagnostic_logs :
@@ -1,3 +1,3 @@
1
1
  module RedhatAccess
2
- VERSION = "2.2.15"
2
+ VERSION = "2.2.16"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redhat_access
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.15
4
+ version: 2.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lindani Phiri
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-29 00:00:00.000000000 Z
12
+ date: 2020-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redhat_access_lib