Files
archived-hc-harbor/app/controllers/admin/base_controller.rb
2025-05-15 09:36:38 -04:00

12 lines
259 B
Ruby

class Admin::BaseController < ApplicationController
before_action :authenticate_admin!
private
def authenticate_admin!
unless current_user&.admin?
redirect_to root_path, alert: "You are not authorized to access this page."
end
end
end