gitlab-org--gitlab-foss/app/controllers/admin/application_controller.rb

14 lines
357 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Provides a base class for Admin controllers to subclass
#
# Automatically sets the layout and ensures an administrator is logged in
class Admin::ApplicationController < ApplicationController
before_action :authenticate_admin!
layout 'admin'
def authenticate_admin!
2017-04-08 22:20:57 -04:00
render_404 unless current_user.admin?
end
end