Sha256: 6e58cc3ee2fa7e3c80d55e9ae997f96c56821f984c18f954713ddd1f31a6faa1
Contents?: true
Size: 829 Bytes
Versions: 85
Compression:
Stored size: 829 Bytes
Contents
module Katello module Authorization::ContentViewVersion extend ActiveSupport::Concern def all_hosts_editable?(lifecycle_environment) total_hosts = ::Host.in_content_view_environment(:content_view => self.content_view, :lifecycle_environment => lifecycle_environment) authorized_hosts = ::Host.authorized("view_hosts").in_content_view_environment(:content_view => self.content_view, :lifecycle_environment => lifecycle_environment) total_hosts.count == authorized_hosts.count end module ClassMethods def readable view_ids = ::Katello::ContentView.readable.collect { |v| v.id } joins(:content_view).where("#{Katello::ContentView.table_name}.id" => view_ids) end end end end
Version data entries
85 entries across 85 versions & 1 rubygems