Sha256: d53639365bf3ad60e483a2768450ddcd04cccea9be181473801b3c8e72d1ef87
Contents?: true
Size: 685 Bytes
Versions: 7
Compression:
Stored size: 685 Bytes
Contents
module ResqueWeb class ApplicationController < ActionController::Base protect_from_forgery before_action :set_subtabs, :authorize helper :all def self.subtabs(*tab_names) return defined?(@subtabs) ? @subtabs : [] if tab_names.empty? @subtabs = tab_names end def set_subtabs(subtabs = self.class.subtabs) @subtabs = subtabs end private def authorize if ENV["RESQUE_WEB_HTTP_BASIC_AUTH_USER"] && ENV["RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD"] authenticate_or_request_with_http_basic {|u, p| u == ENV["RESQUE_WEB_HTTP_BASIC_AUTH_USER"] && p == ENV["RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD"] } end end end end
Version data entries
7 entries across 7 versions & 2 rubygems