73322a0e55
Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
13 lines
357 B
Ruby
13 lines
357 B
Ruby
# 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!
|
|
render_404 unless current_user.admin?
|
|
end
|
|
end
|