app/controllers/api/v1x0/mixins/rbac_mixin.rb
# Klass here is allowed for Request, Stage and Action.
Klass here is allowed for Request, Stage and Action.
Klass here is allowed for Request Stage and Action .
def resource_check(verb, id = params[:id], klass = controller_name.classify.constantize)
          return unless RBAC::Access.enabled?
          permission_check(verb, klass)
          raise Exceptions::NotAuthorizedError, "#{verb.titleize} access not authorized for #{klass} with id: #{id}" unless resource_instance_accessible?(klass.table_name, id)
        end
def resource_check ( verb , id = params [ :id ] , klass = controller_name . classify . constantize ) return unless RBAC :: Access . enabled? permission_check ( verb , klass ) raise Exceptions :: NotAuthorizedError , "#{verb.titleize} access not authorized for #{klass} with id: #{id}" unless resource_instance_accessible? ( klass . table_name , id ) end
Klass here is allowed for Request, Stage and Action.
Klass here is allowed for Request Stage and Action .
verb
<not_specific>
id
<not_specific>
params
<not_specific>
klass
<not_specific>
controller_name
<not_specific>
classify
<not_specific>
constantize
<not_specific>