Sha256: 6d31b846916f641856d9c9d1e86cae2f91e905aa38ce5c4267977e0623eb5e09

Contents?: true

Size: 819 Bytes

Versions: 246

Compression:

Stored size: 819 Bytes

Contents

module Katello
  module Authorization::HostCollection
    extend ActiveSupport::Concern

    include Authorizable

    def readable?
      authorized?(:view_host_collections)
    end

    def creatable?
      authorized?(:create_host_collections)
    end

    def editable?
      authorized?(:edit_host_collections)
    end

    def deletable?
      authorized?(:destroy_host_collections)
    end

    module ClassMethods
      def readable
        authorized(:view_host_collections)
      end

      def readable?
        User.current.can?(:view_host_collections)
      end

      def creatable
        authorized(:create_host_collections)
      end

      def editable
        authorized(:edit_host_collections)
      end

      def deletable
        authorized(:destroy_host_collections)
      end
    end
  end
end

Version data entries

246 entries across 246 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 app/models/katello/authorization/host_collection.rb
katello-4.15.0.rc1 app/models/katello/authorization/host_collection.rb
katello-4.14.1 app/models/katello/authorization/host_collection.rb
katello-4.14.0 app/models/katello/authorization/host_collection.rb
katello-4.14.0.rc3 app/models/katello/authorization/host_collection.rb
katello-4.14.0.rc2 app/models/katello/authorization/host_collection.rb
katello-4.14.0.rc1.1 app/models/katello/authorization/host_collection.rb
katello-4.14.0.rc1 app/models/katello/authorization/host_collection.rb
katello-4.13.1 app/models/katello/authorization/host_collection.rb
katello-4.13.0 app/models/katello/authorization/host_collection.rb
katello-4.12.1 app/models/katello/authorization/host_collection.rb
katello-4.13.0.rc1 app/models/katello/authorization/host_collection.rb
katello-4.12.0 app/models/katello/authorization/host_collection.rb
katello-4.12.0.rc3 app/models/katello/authorization/host_collection.rb
katello-4.12.0.rc2 app/models/katello/authorization/host_collection.rb
katello-4.12.0.rc1 app/models/katello/authorization/host_collection.rb
katello-4.11.1 app/models/katello/authorization/host_collection.rb
katello-4.11.0 app/models/katello/authorization/host_collection.rb
katello-4.11.0.rc2 app/models/katello/authorization/host_collection.rb
katello-4.11.0.rc1 app/models/katello/authorization/host_collection.rb