Sha256: 2aec9875851f69f068f32f16a9945db570a4feb347cac637a48ea03b23360b44
Contents?: true
Size: 732 Bytes
Versions: 25
Compression:
Stored size: 732 Bytes
Contents
module Madmin class ApplicationController < Madmin::BaseController before_action :authenticate_admin_user def authenticate_admin_user # TODO: Add your authentication logic here # For example, we could redirect if the user isn't an admin # redirect_to "/", alert: "Not authorized." unless user_signed_in? && current_user.admin? end # Authenticate with Clearance # include Clearance::Controller # before_action :require_login # Authenticate with Devise # before_action :authenticate_user! # Authenticate with Basic Auth # http_basic_authenticate_with(name: Rails.application.credentials.admin_username, password: Rails.application.credentials.admin_password) end end
Version data entries
25 entries across 18 versions & 1 rubygems