tabletop-companion/app/controllers/admin_controller.rb

15 lines
236 B
Ruby
Raw Normal View History

2024-05-26 09:34:09 +00:00
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