Sha256: 310d61ea0a172d6112551f22bf4bac85dc6efcd15a23684ac08b9fd63cc23a06

Contents?: true

Size: 447 Bytes

Versions: 77

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

module ForemanAnsible
  module Concerns
    # Shared task methods between api controllers
    module ApiCommon
      extend ActiveSupport::Concern

      def find_ansible_roles
        ids = params.fetch(:ansible_role_ids, []) || []
        @ansible_roles = AnsibleRole.authorized(:view_ansible_roles).find(ids)
      rescue ActiveRecord::RecordNotFound => e
        not_found(e.message)
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
foreman_ansible-10.4.4 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-7.1.8 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.4.3 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.4.2 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-7.1.7 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-11.2.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-11.1.2 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-7.1.6 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-11.1.1 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.4.1 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-7.1.5 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-11.1.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.4.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.3.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-11.0.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.2.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.1.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.0.1 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-10.0.0 app/controllers/foreman_ansible/concerns/api_common.rb
foreman_ansible-7.1.4 app/controllers/foreman_ansible/concerns/api_common.rb