Files
grecia/app/controllers/sdg_management/base_controller.rb
Javi Martín d18c627392 Add and apply Layout/EmptyLinesAfterModuleInclusion rule
This rule was added in rubocop 1.79. We were inconsistent about it, so
we're adding it to get more consistency.
2025-11-05 14:27:12 +01:00

19 lines
373 B
Ruby

class SDGManagement::BaseController < ApplicationController
include FeatureFlags
feature_flag :sdg
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&.sdg_manager? || current_user&.administrator?
end
end