Sha256: 9dc14f8edb11720921038d002fd509df7e17b918beba04e1bb15248594a6af92

Contents?: true

Size: 567 Bytes

Versions: 23

Compression:

Stored size: 567 Bytes

Contents

module MyDashboard
  class ApplicationController < ActionController::Base

    before_filter :authentication_with_devise

    private

    def authentication_with_devise
      MyDashboard.config.devise_allowed_models.each do |model|
        self.send("authenticate_#{model.to_s}!")
      end
    end

    def check_accessibility
      auth_token = params.delete(:auth_token)
      if !MyDashboard.config.auth_token || auth_token == MyDashboard.config.auth_token
        true
      else
        render nothing: true, status: 401 and return
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
my_dashboard-0.8.6 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.8.5 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.8.4 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.8.3 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.8.1 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.8.0 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.7.2 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.7.1 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.7.0 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.6.0 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.10 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.9 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.8 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.7 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.6 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.5 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.4 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.3 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.2 app/controllers/my_dashboard/application_controller.rb
my_dashboard-0.5.1 app/controllers/my_dashboard/application_controller.rb