redhat_access 2.0.12 → 2.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcb612f5d8f21d538fecc27022e155a4b8b21b04
4
- data.tar.gz: d74c4dfdc655fd502ae240b6704e001324cebd3f
3
+ metadata.gz: b50bfe2ba71ca6d29c439b3ea427b888a762e075
4
+ data.tar.gz: a90036e549165a0a7cc3c79e71dd844a0d16e38c
5
5
  SHA512:
6
- metadata.gz: 2ca6880bac4b79062cdfe85ce4c32dd1c7e39afd72744c62b8d0b7bf4e4e6a83e8e7d1a3b1863a973780f60ec7b89d7b3d0f2ef0f6a29e916d8dd206ea49f902
7
- data.tar.gz: b49f4490f35c50eb80478286b81b734b72fe822b58cc93a09455f27160f0d76dc8b35f1adcbec6cf44106215df1fdb6bdc4b1d1ea2fa1d3255401e3e89589ba6
6
+ metadata.gz: 0dfdee5396a1e45866f35325d553cf9e09add4850281c9e5cd38cf28f036fff56976841be38e5fc9eabc7e102e70c77ef730dbcad69dde4a794391d1beb1c3ae
7
+ data.tar.gz: 7032edbe6a28fef5b25e2e3e6565186292d0922e362313e258e76491297068a34f44c77f38cf83fc23b87c028693ed745aebe7732d4d4695c960eeb99f62bf71
@@ -8,7 +8,7 @@ module RedhatAccess
8
8
  #@@log_files = ['/var/log/foreman/production.log','/var/log/foreman/delayed_job.log','/var/log/foreman/jobs-startup.log']
9
9
  @@log_files = REDHAT_ACCESS_CONFIG[:diagnostic_logs]
10
10
 
11
- def index
11
+ def logs
12
12
  #
13
13
  # This REST hack of using index for both list and specific resource get
14
14
  # is being forced by the current UI design
@@ -38,7 +38,7 @@ module RedhatAccess
38
38
 
39
39
 
40
40
  def permission_denied
41
- render :template => "katello/common/403"
41
+ render status: 403 , json: {:message => 'Permission denied.'}
42
42
  end
43
43
 
44
44
  def api_version
@@ -3,6 +3,7 @@ require_dependency "redhat_access/application_controller"
3
3
  module RedhatAccess
4
4
  class LogViewerController < ApplicationController
5
5
  def index
6
+ require_admin
6
7
  redirect_to '/redhat_access/#/logviewer'
7
8
  end
8
9
  end
@@ -3,6 +3,7 @@ require_dependency "redhat_access/application_controller"
3
3
  module RedhatAccess
4
4
  class RedhatAccessController < RedhatAccess::ApplicationController
5
5
  def index
6
+ require_admin if params[:path] == "logviewer"
6
7
  end
7
8
  end
8
9
  end
@@ -26,7 +26,7 @@ module RedhatAccess
26
26
 
27
27
  def is_susbcribed_to_redhat?(org)
28
28
  if org
29
- upstream = org.owner_details['upstreamConsumer']
29
+ upstream = upstream_owner(org)
30
30
  return upstream && upstream['idCert'] ? true : false
31
31
  end
32
32
  false
@@ -80,11 +80,12 @@ module RedhatAccess
80
80
 
81
81
  def get_branch_id_for_org(org)
82
82
  if org
83
- if !org.owner_details['upstreamConsumer'] || !org.owner_details['upstreamConsumer']['uuid']
83
+ owner = upstream_owner(org)
84
+ if !owner['uuid']
84
85
  # ldebug('Org manifest not found or invalid in get_branch_id')
85
86
  raise(RecordNotFound, 'Branch ID not found for organization')
86
87
  else
87
- branch_id = org.owner_details['upstreamConsumer']['uuid']
88
+ branch_id = owner['uuid']
88
89
  end
89
90
  else
90
91
  raise(RecordNotFound, 'Organization not found or invalid')
@@ -123,7 +124,7 @@ module RedhatAccess
123
124
  end
124
125
 
125
126
  def get_mutual_tls_auth_options(org, ca_file, verify_peer, ssl_version)
126
- upstream = org.owner_details['upstreamConsumer']
127
+ upstream = upstream_owner(org)
127
128
  if !upstream || !upstream['idCert'] || !upstream['idCert']['cert'] || !upstream['idCert']['key']
128
129
  raise(RecordNotFound, 'Unable to get portal SSL credentials. Missing org manifest?')
129
130
  else
@@ -139,6 +140,14 @@ module RedhatAccess
139
140
  end
140
141
  end
141
142
 
143
+ def upstream_owner(org)
144
+ #We use a cache because owner_details is networkcall to Candlepin
145
+ #We make a lot of these calls each time the UI is accessed
146
+ Rails.cache.fetch("insights_upstream_owner-#{org.id}", expires_in: 1.minute) do
147
+ org.owner_details['upstreamConsumer']
148
+ end
149
+ end
150
+
142
151
  def get_basic_auth_options(org, ca_file, verify_peer, ssl_version)
143
152
  opts = {
144
153
  :user => org.telemetry_configuration.portal_user,
@@ -143,18 +143,17 @@ module RedhatAccess
143
143
 
144
144
  def current_user_map
145
145
  map = {}
146
- users = ::User.select do |user|
147
- user.receives?(:insights_notifications) && user.mail_enabled? && user.allowed_organizations.include?(@org)
148
- end
149
- users.each do |user|
150
- map[user_login_to_hash(user.login)] = user
146
+ User.as_anonymous_admin do
147
+ users = ::User.select do |user|
148
+ user.receives?(:insights_notifications) && user.mail_enabled? && user.allowed_organizations.include?(@org)
149
+ end
150
+ users.each do |user|
151
+ map[user_login_to_hash(user.login)] = user
152
+ end
151
153
  end
152
154
  map
153
155
  end
154
156
 
155
- def user_hash_to_login(user_hash)
156
- @user_map[user_hash]
157
- end
158
157
 
159
158
  def http_request(options, add_user_header=false)
160
159
  unless options[:params]
@@ -174,12 +173,6 @@ module RedhatAccess
174
173
 
175
174
  end
176
175
 
177
- def handle_errors(http_code)
178
- return if http_code == 200 or http_code == 201
179
- case http_code
180
- when 401
181
- end
182
- end
183
176
 
184
177
  def new_api_client(add_user_header)
185
178
  options = get_http_options(add_user_header)
@@ -1,254 +1,136 @@
1
- <body style="background-color: #687079; margin: 0; padding: 0;">
2
- <table id="outermost-table" cellpadding="0" cellspacing="0" style="border: 0; margin: 0; padding: 0; width: 100%;">
3
- <tbody>
4
- <tr>
5
- <td align="center" valign="top">
6
- <table width="640" cellspacing="0" cellpadding="0">
7
- <tbody>
8
- <tr>
9
- <td height="20"></td>
10
- </tr>
11
- <tr>
12
- <td width="640" valign="top">
13
- <div id="header">
14
- <!-- HEADER -->
15
- <table width="640" border="0" cellspacing="0" cellpadding="20" background="https://access.redhat.com/insightsbeta/images/email_bg.jpg">
16
- <tbody>
17
- <tr>
18
- <td valign="top">
19
- <table border="0" cellspacing="0" cellpadding="0" width="600">
20
- <tbody>
21
- <tr>
22
- <td align="left" width="50%">
23
- <img id="rh-logo" src="https://access.redhat.com/insightsbeta/images/email_logo.png" alt="Logo" style="border: 0; display: block;">
24
- </td>
25
- </tr>
26
- </tbody>
27
- </table>
28
- <table border="0" cellspacing="0" cellpadding="0" width="600">
29
- <tbody>
30
- <tr>
31
- <td height="25"></td>
32
- </tr>
33
- <tr>
34
- <td align="center">
35
- <table>
36
- <tbody>
37
- <tr>
38
- <td>
39
- <img id="insights-text" src="https://access.redhat.com/insightsbeta/images/email_rhi.png" style="min-height: auto; width: 360px;">
40
- <div id="hbi-subject" style="margin-top: 8px; text-align: right;">
41
- <span id="hbi-subject-text" style="color: #fff; font-family: 'Arimo',Arial,sans-serif; font-size: 14px;">
42
- <!-- EMAIL SUBJECT -->
43
- Weekly Report for <%= Time.now.strftime("%B %e, %Y") %>
44
- </span>
45
- </div>
46
- </td>
47
- </tr>
48
- </tbody>
49
- </table>
50
- </td>
51
- </tr>
52
- <tr>
53
- <td height="35"></td>
54
- </tr>
55
- </tbody>
56
- </table>
57
- </td>
58
- </tr>
59
- </tbody>
60
- </table>
61
- </div>
62
- </td>
63
- </tr>
64
- <tr>
65
- <td>
66
- <div id="hbi-content" style="background-color: #ffffff;">
67
- <!-- CONTENT -->
68
- <table width="640" border="0" cellspacing="20" cellpadding="10">
69
- <tbody>
70
- <tr>
71
- <td align="center" style="padding:60px 0 0;font-size:36px;color:#585858;font-weight:700">
72
- <font face="'Arimo', Arial, sans-serif">
73
- Your <span class="il">weekly</span> Insights report
74
- </font>
75
- </td>
76
- </tr>
77
- <tr>
78
- <td style="font-size:16px;color:#585858;padding-bottom:40px">
79
- <p>
80
- <font face="'Arimo', Arial, sans-serif">
81
- <p>
82
- Hi <%= @user.name %>,
83
- </p>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1;">
3
+ <body>
4
+ <style type="text/css">
5
+ a, a:visited {
6
+ color: #6bb5df !important;
7
+ }
84
8
 
85
- <p>
86
- You currently have
87
- <a href="<%=@server_url%>/inventory?product=all&amp;utm_source=all_systems_first_paragraph&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail">
88
- <strong><%= @data.total_systems %> system(s)</strong>
89
- </a>
90
- registered with Insights in the <%=@org.name%> organization and
9
+ a:hover {
10
+ color: #CCCCCC !important;
11
+ }
12
+ </style>
13
+ <div style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1;">
14
+ <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" bgcolor="#f1f1f1">
15
+ <tr>
16
+ <td align="center" valign="top">
17
+ <table border="0" id="emailContainer" style="max-width: 600px;">
18
+ <tr>
19
+ <td align="center" valign="top">
20
+ <div align="left">
21
+ <h2 style="font-weight: normal;"> Your weekly Insights report
22
+ for <%= Time.now.strftime("%B %e, %Y") %></h2>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <td style="font-size:16px;color:#585858;padding-bottom:40px">
27
+ <p>
28
+ <font face="'Arimo', Arial, sans-serif">
29
+ <p>
30
+ Hi <%= @user.name %>,
31
+ </p>
91
32
 
92
- <a href="<%=@server_url%>/actions?product=all&amp;initialSeverity=ERROR&amp;utm_source=high_sev_hits_first_paragraph&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail">
93
- <strong>
94
- <%= @data.high_severity_hits %>
95
- </strong>
96
- </a>
97
- high severity hits.
98
- </p>
99
- <% rules = @data.new_rules %>
100
- <% if rules.length > 0 %>
101
- <p>
102
- <% has = rules.length > 1 ? 'have' : 'has' %>
103
- <%= "There #{has} been #{rules.length} new rule{s} discovered since your last weekly report:" %>
104
- </p>
105
- <%= render partial: "new_rules_section", locals: { new_rules: rules , server_url: @server_url} %>
106
- <% end %>
107
- <p>
108
- We want you to get the most out of Insights and would love to hear your
109
- questions and comments. Feel free to email us at
110
- <a href="mailto:insights+weekly@redhat.com">insights+weekly@redhat.com</a>,
111
- and we'll get
112
- back to you as soon as we can.
113
- </p>
114
- </font>
115
- </p>
116
- </td>
117
- </tr>
118
- </tbody>
119
- </table>
33
+ <p>
34
+ You currently have
35
+ <a href="<%= @server_url %>/inventory?product=all&amp;utm_source=all_systems_first_paragraph&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail">
36
+ <strong><%= @data.total_systems %> system(s)</strong>
37
+ </a>
38
+ registered with Insights in the <%= @org.name %> organization and
120
39
 
121
- <table width="640" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="padding-bottom:40px">
122
- <tbody>
40
+ <a href="<%= @server_url %>/actions?product=all&amp;initialSeverity=ERROR&amp;utm_source=high_sev_hits_first_paragraph&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail">
41
+ <strong>
42
+ <%= @data.high_severity_hits %> high severity
43
+ </strong>
44
+ </a>
45
+ hits.
46
+ </p>
47
+ <% rules = @data.new_rules %>
48
+ <% if rules.length > 0 %>
49
+ <p>
50
+ <% has = rules.length > 1 ? 'have' : 'has' %>
51
+ <%= "There #{has} been #{rules.length} new rule{s} discovered since your last weekly report:" %>
52
+ </p>
53
+ <%= render partial: "new_rules_section", locals: {new_rules: rules, server_url: @server_url} %>
54
+ <% end %>
55
+ <p>
56
+ We want you to get the most out of Insights and would love to hear your
57
+ questions and comments. Feel free to email us at
58
+ <a href="mailto:insights+weekly@redhat.com">insights+weekly@redhat.com</a>,
59
+ and we'll get
60
+ back to you as soon as we can.
61
+ </p>
62
+ </font>
63
+ </p>
64
+ </td>
65
+ </tr>
66
+ <tr>
67
+ <td align="center" valign="top">
68
+ <table border="0" width="100%" id="emailHeader" style="background-color: #e1e2e3;" bgcolor="#e1e2e3">
123
69
  <tr>
124
- <td valign="top" align="left">
125
- <table align="center" width="200">
126
- <tbody>
127
- <tr>
128
- <td align="center">
129
- <a href="<%=@server_url%>/actions?product=all&amp;utm_source=total_actions&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank">
130
- <table style="background-color:#535e6a;width:136px;height:136px;color:#fff;font-family:'Arimo',sans-serif;font-weight:700;font-size:52px;border-width:12px;border-color:#cad6e2;border-style:solid;text-align:center;border-radius:50%" align="center">
131
- <tbody style="width:136px">
132
- <tr>
133
- <td style="vertical-align:middle">
134
- <span><%= @data.total_actions %></span>
135
- </td>
136
- </tr>
137
- </tbody>
138
- </table>
139
- </a>
140
- </td>
141
- </tr>
142
- <tr>
143
- <td align="center" style="font-family:'Arimo',Arial,sans-serif;padding-top:16px">
144
- <a href="<%=@server_url%>/actions?product=all&amp;utm_source=total_actions&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#535e6a;text-decoration:none" target="_blank">Total Actions</a>
145
- </td>
146
- </tr>
147
- </tbody>
148
- </table>
149
- </td>
150
- <td width="20"></td>
151
- <td valign="top" align="left">
152
- <table align="center" width="200">
153
- <tbody>
154
- <tr>
155
- <td align="center">
156
- <a href="<%=@server_url%>/actions?product=all&amp;initialSeverity=ERROR&amp;utm_source=high_sev_hits&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank">
157
- <table style="background-color:#535e6a;width:136px;height:136px;color:#fff;font-family:'Arimo',sans-serif;font-weight:700;font-size:52px;border-width:12px;border-color:#cad6e2;border-style:solid;text-align:center;border-radius:50%" align="center">
158
- <tbody style="width:136px">
159
- <tr>
160
- <td style="vertical-align:middle">
161
- <span><%= @data.high_severity_hits %></span>
162
- </td>
163
- </tr>
164
- </tbody>
165
- </table>
166
- </a>
167
- </td>
168
- </tr>
169
- <tr>
170
- <td align="center" style="font-family:'Arimo',Arial,sans-serif;padding-top:16px">
171
- <a href="<%=@server_url%>/actions?product=all&amp;initialSeverity=ERROR&amp;utm_source=high_sev_hits&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#535e6a;text-decoration:none" target="_blank">High Severity Hits</a>
172
- </td>
173
- </tr>
174
- </tbody>
175
- </table>
176
- </td>
177
- <td width="20"></td>
178
- <td valign="top" align="left">
179
- <table align="center" width="200">
180
- <tbody>
181
- <tr>
182
- <td align="center">
183
- <a href="<%=@server_url%>/inventory?product=all&amp;utm_source=percent_checkin&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank">
184
- <table style="background-color:#535e6a;width:136px;height:136px;color:#fff;font-family:'Arimo',sans-serif;font-weight:700;font-size:52px;border-width:12px;border-color:#cad6e2;border-style:solid;text-align:center;border-radius:50%" align="center">
185
- <tbody style="width:136px">
186
- <tr>
187
- <td style="vertical-align:middle">
188
- <span><%= @data.checking_in_pct %></span><span style="font-size:16px;vertical-align:top">%</span>
189
- </td>
190
- </tr>
191
- </tbody>
192
- </table>
193
- </a>
194
- </td>
195
- </tr>
196
- <tr>
197
- <td align="center" style="color:#535e6a;font-family:'Arimo',Arial,sans-serif;padding-top:16px">
198
- <a href="<%=@server_url%>/inventory?product=all&amp;utm_source=percent_checkin&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#535e6a;text-decoration:none" target="_blank">Systems Checking In</a>
199
- </td>
200
- </tr>
201
- </tbody>
202
- </table>
203
- </td>
204
- </tr>
205
- </tbody>
206
- </table>
70
+ <td align="left" valign="top" style="padding: 0px 20px;">
71
+ <div align="center" style="margin: 10px 0px;">
72
+ <table class="summary" style="border: 1px solid; padding: 5px; background-color: #ffffff; border-collapse: collapse; text-align: center; width: 100%;" bgcolor="#ffffff">
73
+ <tr>
74
+ <td style="width: 33%; padding: 5px; border: 1px solid #ccc;">
75
+ <b class="counter" style="color: #6bb5df;">
76
+ <a href="<%= @server_url %>/actions?product=all&amp;utm_source=total_actions&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank"><%= @data.total_actions %></a>
77
+ </b>
207
78
 
208
- </div>
209
- </td>
210
- </tr>
211
- <tr>
212
- <td>
213
- <div id="goto">
214
- <!-- GO TO INSIGHTS BUTTON -->
215
- <table class="footer-table go2insights" style="background-color: #ffffff; border: 0; min-width: 640px !important; padding: 20px 0 60px; width: 640px;">
216
- <tbody>
217
- <tr>
218
- <td align="center">
219
- <a id="go2insights-button" href="<%=@server_url%>/overview?utm_source=insights_overview&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" target="_blank" style="background: #03afe8; border-radius: 4px; color: #fff; font-family: 'Arimo',Arial,sans-serif; font-size: 12px; padding: 10px 20px; text-decoration: none;">
220
- Go To Insights
221
- </a>
222
- </td>
223
- </tr>
224
- </tbody>
225
- </table>
226
- </div>
227
- </td>
228
- </tr>
229
- <tr>
230
- <td>
231
- <div id="footer">
232
- <!-- FOOTER -->
233
- <table class="footer-table footer" style="background-color: #fafafa; border: 0; min-width: 640px !important; padding: 40px 0 80px; width: 640px;">
234
- <tbody>
235
- <tr>
236
- <td align="center">
237
- <font face="'Arimo', Arial, sans-serif" style="font-size:12px;color:#333333">
238
- Copyright © 2016 Red Hat, All rights reserved.<br>
239
- <a href="<%=@email_settings_url%>" style="color:#333333" target="_blank">Update email preferences</a>
240
- </font>
79
+ <p class="summary-title" style="font-size: 80%; font-weight: bold; margin: 5px; padding: 0px;">
80
+ <a href="<%= @server_url %>/actions?product=all&amp;utm_source=total_actions&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank">Total
81
+ Actions</a></p>
82
+ </td>
83
+ <td style="width: 33%; padding: 5px; border: 1px solid #ccc;">
84
+ <b class="counter" style="color: #6bb5df;">
85
+ <a href="<%= @server_url %>/actions?product=all&amp;initialSeverity=ERROR&amp;utm_source=high_sev_hits&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank"><%= @data.high_severity_hits %></a>
86
+ </b>
87
+
88
+ <p class="summary-title" style="font-size: 80%; font-weight: bold; margin: 5px; padding: 0px;">
89
+ <a href="<%= @server_url %>/actions?product=all&amp;initialSeverity=ERROR&amp;utm_source=high_sev_hits&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank">High
90
+ Severity Issues</a>
91
+ </p>
92
+ </td>
93
+ <td style="width: 33%; padding: 5px; border: 1px solid #ccc;">
94
+ <b class="counter" style="color: #6bb5df;">
95
+ <a href="<%= @server_url %>/inventory?product=all&amp;utm_source=percent_checkin&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank"><%= @data.checking_in_pct %>% </a>
96
+ </b>
97
+
98
+ <p class="summary-title" style="font-size: 80%; font-weight: bold; margin: 5px; padding: 0px;">
99
+ <a href="<%= @server_url %>/inventory?product=all&amp;utm_source=percent_checkin&amp;utm_medium=email&amp;utm_campaign=WeeklyEmail" style="color:#ffffff;text-decoration:none" target="_blank">Hosts
100
+ Checking In</a></p>
101
+ </td>
102
+ </tr>
103
+ </table>
104
+ </div>
241
105
  </td>
242
106
  </tr>
243
- </tbody>
244
107
  </table>
245
- </div>
246
- </td>
247
- </tr>
248
- </tbody>
249
- </table>
250
- </td>
251
- </tr>
252
- </tbody>
253
- </table>
254
- </body>
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <td>
112
+ <div id="footer">
113
+ <!-- FOOTER -->
114
+ <table class="footer-table footer" style="background-color: #fafafa; border: 0; min-width: 640px !important; padding: 40px 0 80px; width: 640px;">
115
+ <tbody>
116
+ <tr>
117
+ <td align="center">
118
+ <font face="'Arimo', Arial, sans-serif" style="font-size:12px;color:#333333">
119
+ Copyright © 2018 Red Hat, All rights reserved.<br>
120
+ <a href="<%= @email_settings_url %>" style="color:#333333" target="_blank">Update email
121
+ preferences</a>
122
+ </font>
123
+ </td>
124
+ </tr>
125
+ </tbody>
126
+ </table>
127
+ </div>
128
+ </td>
129
+ </tr>
130
+ </table>
131
+ </td>
132
+ </tr>
133
+ </table>
134
+ </div>
135
+ </body>
136
+ </html>
data/config/routes.rb CHANGED
@@ -2,7 +2,7 @@ RedhatAccess::Engine.routes.draw do
2
2
 
3
3
  #API routes
4
4
  get 'configuration' => 'configuration#index'
5
- get 'logs' => 'api/logs#index'
5
+ get 'logs' => 'api/logs#logs'
6
6
  get 'attachments' => 'api/attachments#index'
7
7
  post 'attachments' => 'api/attachments#create'
8
8
 
@@ -120,6 +120,8 @@ module RedhatAccess
120
120
  permission :strata_api,{:"redhat_access/api/strata_proxy" => [:call]}, :public => true
121
121
 
122
122
  # Logs require special permissions
123
+ #These are here for legacy and do not enable anything (only super admin user should have access to the logs)
124
+ #The roles are deliberately mappped to unused controller action
123
125
  permission :view_log_viewer, {:"redhat_access/logviewer" => [:index]}
124
126
  permission :logs, {:"redhat_access/logs" => [:index]}
125
127
 
@@ -149,7 +151,7 @@ module RedhatAccess
149
151
  menu :header_menu,
150
152
  :LogViewer,
151
153
  :url => '/redhat_access/logviewer',
152
- :url_hash => {:controller => :"redhat_access/logs", :action => :index},
154
+ :url_hash => {:controller => :"redhat_access/logs", :action => :logs},
153
155
  :engine => RedhatAccess::Engine,
154
156
  :caption => N_('Logs'),
155
157
  :turbolinks => false
@@ -1,3 +1,3 @@
1
1
  module RedhatAccess
2
- VERSION = "2.0.12"
2
+ VERSION = "2.0.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redhat_access
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lindani Phiri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-02 00:00:00.000000000 Z
11
+ date: 2018-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redhat_access_lib