Files
grecia/app/controllers/sdg_management/base_controller.rb
2020-12-02 12:38:03 +01:00

15 lines
298 B
Ruby

class SDGManagement::BaseController < ApplicationController
layout "admin"
before_action :authenticate_user!
before_action :verify_sdg_manager
skip_authorization_check
private
def verify_sdg_manager
raise CanCan::AccessDenied unless current_user&.administrator?
end
end