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.2.6 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.15 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.8 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.5 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.4 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.3 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.14 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.7 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.2 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.2.0 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.6 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.5 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.4 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.3 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.2 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.1 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.1.0 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.13 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.12 app/helpers/redhat_access/analytics_dashboard_helper.rb
redhat_access-2.0.11 app/helpers/redhat_access/analytics_dashboard_helper.rb