lib/authz/controllers/authorization_manager.rb
def authorize(using: nil, skip_scoping: false)
        @_authorization_performed = true

        authorized = authorized?(controller: params[:controller],
                                 action: params[:action],
                                 using: using,
                                 skip_scoping: skip_scoping)
        return using if authorized

        raise NotAuthorized, rolable: authz_user,
                             controller: params[:controller],
                             action: params[:action],
                             instance: using
      end
# Enforces authorization when called.
# Raises exception when unauthorized.
#
# @param using [Object] the instance that will determine access
# @param skip_scoping [Boolean] use true to explicitly skip scoping
# @return [Object] the instance that was given as param
# @raise [NotAuthorized] when unauthorized.
#        May be rescued to provide custom behaviour.
# @api public
# @see #authorized?
# @!visibility public
Enforces authorization when called.
Raises exception when unauthorized.
Enforces authorization when called . Raises exception when unauthorized .
def authorize(using: nil, skip_scoping: false)
        @_authorization_performed = true
        authorized = authorized?(controller: params[:controller],
                                 action: params[:action],
                                 using: using,
                                 skip_scoping: skip_scoping)
        return using if authorized
        raise NotAuthorized, rolable: authz_user,
                             controller: params[:controller],
                             action: params[:action],
                             instance: using
      end
def authorize ( using : nil , skip_scoping : false ) @_authorization_performed = true authorized = authorized? ( controller : params [ :controller ] , action : params [ :action ] , using : using , skip_scoping : skip_scoping ) return using if authorized raise NotAuthorized , rolable : authz_user , controller : params [ :controller ] , action : params [ :action ] , instance : using end
Enforces authorization when called.
Enforces authorization when called .
the instance that was given as param
the instance that was given as param
Object
[NotAuthorized] when unauthorized. May be rescued to provide custom behaviour.
[ NotAuthorized ] when unauthorized . May be rescued to provide custom behaviour .
using
the instance that will determine access
the instance that will determine access
skip_scoping
use true to explicitly skip scoping
use true to explicitly skip scoping
api
None
see
None
!visibility
None