Sha256: 773e1fda98619819a10c4b802ff80ddfca5a338760513b73020c4c34567534a0

Contents?: true

Size: 882 Bytes

Versions: 40

Compression:

Stored size: 882 Bytes

Contents

module RedhatAccess
  module AnalyticsDashboardHelper
    include RedhatAccess::Telemetry::LookUps

    def help_path?
      Rails.logger.info("Helper path ? #{request.path == '/redhat_access/insights/help'}")
      request.path == '/redhat_access/insights/help'
    end

    def manage_path?
      Rails.logger.info("Manage path ? #{request.path == '/redhat_access/insights/manage'}")
      request.path == '/redhat_access/insights/manage'
    end

    def view_preconditions_met?
      if (help_path?)
        return true
      elsif (!is_org_selected?)
        return false
      elsif !telemetry_enabled?(Organization.current) && !manage_path?
        return false
      elsif !is_susbcribed_to_redhat?(Organization.current)
        return false
      elsif disconnected_org?(Organization.current)
        return false
      else
        return true
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
redhat_access-2.9.1 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.8.1 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.20 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.19 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.18 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.17 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.16 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.15 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.14 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.13 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.12 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.11 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.10 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.9 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.8 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.7 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.10 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.17 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.16 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.9 app/helpers/redhat_access/analytics_dashboard_helper.rb