BigW Consortium Gitlab

application_controller.rb 336 Bytes
Newer Older
1 2 3
# Provides a base class for Admin controllers to subclass
#
# Automatically sets the layout and ensures an administrator is logged in
4
class Admin::ApplicationController < ApplicationController
5
  before_action :authenticate_admin!
6
  layout 'admin'
7 8 9 10 11

  def authenticate_admin!
    return render_404 unless current_user.is_admin?
  end
end