Class: Parse::CLPScope::AccessEvaluation

Inherits:
Struct
  • Object
show all
Defined in:
lib/parse/clp_scope.rb

Overview

Result of evaluating a single CLP branch for object-access inspection. This is intentionally richer than permits?: Parse Server only applies pointer permissions when no public/user/role branch already grants the operation, and callers must then inspect the target row before answering.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pointer_fields ⇒ Object

Returns the value of attribute pointer_fields

Returns:

  • (Object) —

    the current value of pointer_fields



55
56
57
# File 'lib/parse/clp_scope.rb', line 55

def pointer_fields
  @pointer_fields
end

#reason ⇒ Object

Returns the value of attribute reason

Returns:

  • (Object) —

    the current value of reason



55
56
57
# File 'lib/parse/clp_scope.rb', line 55

def reason
  @reason
end

#role_claims ⇒ Object

Returns the value of attribute role_claims

Returns:

  • (Object) —

    the current value of role_claims



55
56
57
# File 'lib/parse/clp_scope.rb', line 55

def role_claims
  @role_claims
end

#status ⇒ Object

Returns the value of attribute status

Returns:

  • (Object) —

    the current value of status



55
56
57
# File 'lib/parse/clp_scope.rb', line 55

def status
  @status
end

#via ⇒ Object

Returns the value of attribute via

Returns:

  • (Object) —

    the current value of via



55
56
57
# File 'lib/parse/clp_scope.rb', line 55

def via
  @via
end

Instance Method Details

#allowed? ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/parse/clp_scope.rb', line 59

def allowed?
  status == :allowed
end

#denied? ⇒ Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/parse/clp_scope.rb', line 63

def denied?
  status == :denied
end

#row_check_required? ⇒ Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/parse/clp_scope.rb', line 71

def row_check_required?
  status == :allowed && pointer_fields&.any?
end

#unknown? ⇒ Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/parse/clp_scope.rb', line 67

def unknown?
  status == :unknown
end