Sha256: 15168e5f03c9c3ca14c6fc0e9e8f476ab2a3c4eda71dddae5da313fa5f63e9b1
Contents?: true
Size: 818 Bytes
Versions: 31
Compression:
Stored size: 818 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 = ContentView.readable.collect { |v| v.id } joins(:content_view).where("#{Katello::ContentView.table_name}.id" => view_ids) end end end end
Version data entries
31 entries across 31 versions & 1 rubygems