Sha256: 37cd1504b29e4e89816937b4bcb67714bf9f9309e5617b104363a810416419f5
Contents?: true
Size: 530 Bytes
Versions: 13
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true module Maglev module Admin class BaseController < ::Maglev::ApplicationController layout 'maglev/admin/application' before_action :maglev_authenticate private def maglev_authenticate username = maglev_config.admin_username password = maglev_config.admin_password return if !username || !password redirect_to main_app.root_path unless authenticate_with_http_basic { |u, p| username == u && password == p } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems