Sha256: 6f2ecfba497b098a764d71c1cebd981421e0f6039aeda47add8ce18720fff3f9
Contents?: true
Size: 791 Bytes
Versions: 135
Compression:
Stored size: 791 Bytes
Contents
module Katello module Authorization::ActivationKey extend ActiveSupport::Concern include Authorizable def readable? authorized?(:view_activation_keys) end def editable? authorized?(:edit_activation_keys) end def deletable? authorized?(:destroy_activation_keys) end module ClassMethods def readable authorized(:view_activation_keys) end def editable authorized(:edit_activation_keys) end def any_editable? editable.count > 0 end def all_editable?(content_view, environments) key_query = ActivationKey.where(:content_view_id => content_view, :environment_id => environments) key_query.count == key_query.editable.count end end end end
Version data entries
135 entries across 135 versions & 1 rubygems