diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2d5455b67..da66f249b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2172,7 +2172,7 @@ module ApplicationHelper candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 elsif attachment.container.is_a?(OrgDocumentComment) org = attachment.container.organization - candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1) + candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1) elsif (attachment.container.has_attribute?(:board) || attachment.container.has_attribute?(:board_id)) && attachment.container.board && attachment.container.board.course course = attachment.container.board.course diff --git a/app/helpers/quality_analysis_helper.rb b/app/helpers/quality_analysis_helper.rb index afafac3b1..f7dbf3469 100644 --- a/app/helpers/quality_analysis_helper.rb +++ b/app/helpers/quality_analysis_helper.rb @@ -3,7 +3,7 @@ module QualityAnalysisHelper def sonar_time sonar_name sonar = open(@sonar_address + "/api/resources/index?resource=#{sonar_name}&depth=0").read - sonar =JSON.parse(sonar).first + sonar =JSON.parse(sonar).first['date'] end def sqale_rating_status val diff --git a/app/views/quality_analysis/_result_list.html.erb b/app/views/quality_analysis/_result_list.html.erb index 108e5c58e..5b4e4f5a0 100644 --- a/app/views/quality_analysis/_result_list.html.erb +++ b/app/views/quality_analysis/_result_list.html.erb @@ -21,7 +21,7 @@ - + <% if User.current.try(:login) == qa.author_login || User.current.admin? || is_project_manager?(User.current.id, @project.id) %>