Sha256: 6d1119b9f2e82ebd47115e99c697ccf3dc939607a6243a3023199121de174ead

Contents?: true

Size: 700 Bytes

Versions: 40

Compression:

Stored size: 700 Bytes

Contents

require 'dynflow'

module ForemanTasks
  # Class for configuring and preparing the Dynflow runtime environment.
  class Dynflow < ::Dynflow::Rails
    require 'foreman_tasks/dynflow/console_authorizer'

    def web_console
      ::Dynflow::Web.setup do
        before do
          if !Setting[:dynflow_enable_console] ||
             (Setting[:dynflow_console_require_auth] && !ConsoleAuthorizer.new(env).allow?)
            halt 403, 'Access forbidden'
          end
        end

        set(:custom_navigation) do
          { _('Back to tasks') => "/#{ForemanTasks::TasksController.controller_path}" }
        end
        set(:world) { Rails.application.dynflow.world }
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
foreman-tasks-0.16.3 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.11 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.16.2 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.10 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.16.1 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.17.0 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.9 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.8 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.14.6 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.7 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.16.0 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.6 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.5 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.4 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.3 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.2 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.1 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.15.0 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.14.5 lib/foreman_tasks/dynflow.rb
foreman-tasks-0.14.4 lib/foreman_tasks/dynflow.rb