Add SDG content section
This commit is contained in:
14
app/controllers/sdg_management/base_controller.rb
Normal file
14
app/controllers/sdg_management/base_controller.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user