Welcome to mirror list, hosted at ThFree Co, Russian Federation.

application_controller.rb « admin « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6a8f20f60471fe3722bf630077b07ec5b6cf02e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
# Provides a base class for Admin controllers to subclass
#
# Automatically sets the layout and ensures an administrator is logged in
class Admin::ApplicationController < ApplicationController
  layout 'admin'
  before_filter :authenticate_admin!

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