Class: Madmin::ApplicationController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Madmin::ApplicationController
- Defined in:
- app/controllers/madmin/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#authenticate_admin_user ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/madmin/application_controller.rb', line 5 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 |