Sha256: f7a67a76817ca27fc99bd2b8f7a6dbfce01791c66f92536b5e58ce8eec9a014b

Contents?: true

Size: 517 Bytes

Versions: 16

Compression:

Stored size: 517 Bytes

Contents

module ForemanTasks
  # Monkey path until http://projects.theforeman.org/issues/8919 is
  # resolved and released
  module AuthorizerExt
    extend ActiveSupport::Concern

    included do
      alias_method_chain :resource_name, :authorized_resource_name
    end

    def resource_name_with_authorized_resource_name(klass)
      if klass.respond_to?(:authorized_resource_name)
        klass.authorized_resource_name
      else
        resource_name_without_authorized_resource_name(klass)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman-tasks-0.10.9 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.8 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.7 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.6 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.4 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.6 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.3 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.2 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.1 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.5 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.10.0 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.4 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.3 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.2 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.1 lib/foreman_tasks/authorizer_ext.rb
foreman-tasks-0.9.0 lib/foreman_tasks/authorizer_ext.rb