Sha256: 6f2ac11b9d9a4a04a779d8219f5330e905b2dc3b93a5fdc7a71b5dfe072d2ae9
Contents?: true
Size: 1.07 KB
Versions: 135
Compression:
Stored size: 1.07 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 content_readable(org) readable.where(:organization_id => org) end end end end
Version data entries
135 entries across 135 versions & 1 rubygems