Class: Zuul::ActionController::Evaluators::ForRole

Inherits:
ForTarget
  • Object
show all
Defined in:
lib/zuul/action_controller/evaluators.rb

Instance Method Summary collapse

Methods inherited from ForTarget

#else, #else_for, #for_target

Instance Method Details

#match?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/zuul/action_controller/evaluators.rb', line 42

def match?
  (@dsl.subject.nil? && @target == @dsl.logged_out) || (!@dsl.subject.nil? && (@target == @dsl.logged_in || @dsl.subject.has_role?(@target, @context, @force_context)))
end