Sha256: 9f325e2085eca1aefcd9f6be234663d124e8514817d6ef46c3a242cf6837e855
Contents?: true
Size: 1.23 KB
Versions: 118
Compression:
Stored size: 1.23 KB
Contents
module Katello module Authorization::LifecycleEnvironment extend ActiveSupport::Concern include Authorizable def readable? authorized?(:view_lifecycle_environments) end def creatable? self.class.creatable? end def editable? authorized?(:edit_lifecycle_environments) end def deletable? authorized?(:destroy_lifecycle_environments) end def promotable_or_removable? authorized?(:promote_or_remove_content_views_to_environments) end module ClassMethods def readable authorized(:view_lifecycle_environments) end def promotable authorized(:promote_or_remove_content_views_to_environments) end def promotable? User.current.can?(:promote_or_remove_content_views_to_environments) end def any_promotable? promotable.count > 0 end def creatable? ::User.current.can?(:create_lifecycle_environments) end def deletable authorized(:destroy_lifecycle_environments) end def editable authorized(:edit_lifecycle_environments) end def content_readable(org) readable.where(:organization_id => org) end end end end
Version data entries
118 entries across 118 versions & 1 rubygems