Katello/katello

View on GitHub
app/models/katello/authorization/content_credential.rb

Summary

Maintainability
A
30 mins
Test Coverage
module Katello
  module Authorization::ContentCredential
    extend ActiveSupport::Concern

    include Authorizable

    def readable?
      authorized?(:view_content_credentials)
    end

    def editable?
      authorized?(:edit_content_credentials)
    end

    def deletable?
      authorized?(:destroy_content_credentials)
    end

    module ClassMethods
      def readable
        authorized(:view_content_credentials)
      end

      def editable
        authorized(:edit_content_credentials)
      end

      def deletable
        authorized(:destroy_content_credentials)
      end
    end
  end
end