Class: Madmin::ApplicationController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/madmin/application_controller.rb

Direct Known Subclasses

DashboardController, ResourceController

Instance Method Summary collapse

Instance Method Details

#authenticate_admin_userObject



7
8
9
10
11
12
13
14
15
# File 'app/controllers/madmin/application_controller.rb', line 7

def authenticate_admin_user
  # TODO: Add your authentication logic here

  # For example, with Rails 8 authentication
  # redirect_to "/", alert: "Not authorized." unless authenticated? && Current.user.admin?

  # Or with Devise
  # redirect_to "/", alert: "Not authorized." unless current_user&.admin?
end