BigW Consortium Gitlab

application_controller.rb 329 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

  def authenticate_admin!
9
    render_404 unless current_user.is_admin?
10
  end
11
end