tabletop-companion/app/controllers/admin_controller.rb

17 lines
267 B
Ruby

# frozen_string_literal: true
class AdminController < ApplicationController
layout "admin"
before_action :authenticate_user_as_admin
def index
end
private
def authenticate_user_as_admin
head :forbidden unless Current.user&.admin?
end
end