Sha256: 363d49cc0a4156bf620d12ece97b0fb62a3b0e86569dfe0741e9124adf9588f2
Contents?: true
Size: 561 Bytes
Versions: 77
Compression:
Stored size: 561 Bytes
Contents
module InsightsCloud module ClientAuthentication extend ActiveSupport::Concern include ::Katello::Authentication::ClientAuthentication def authorize client_authorized? || super end def client_authorized? authenticate_client && valid_machine_user? end def valid_machine_user? subscribed_host_by_uuid(User.current.uuid).present? end def subscribed_host_by_uuid(uuid) @host = Host.unscoped.joins(:subscription_facet).where(:katello_subscription_facets => {:uuid => uuid }).first end end end
Version data entries
77 entries across 77 versions & 1 rubygems