Module: UffizziCore::AuthorizationConcern

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/uffizzi_core/authorization_concern.rb

Instance Method Summary collapse

Instance Method Details

#init_authorizeObject



10
11
12
13
14
# File 'app/controllers/concerns/uffizzi_core/authorization_concern.rb', line 10

def init_authorize
  return unless self.class.ancestors.include?(UffizziCore::ApplicationController)

  self.class.send(:define_method, policy_method_name) { send(:authorize, policy_method_params) }
end

#pundit_userObject



16
17
18
# File 'app/controllers/concerns/uffizzi_core/authorization_concern.rb', line 16

def pundit_user
  policy_context
end