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_fieldsObject

Returns the value of attribute pointer_fields

Returns:

  • (Object)

    the current value of pointer_fields



51
52
53
# File 'lib/parse/clp_scope.rb', line 51

def pointer_fields
  @pointer_fields
end

#reasonObject

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



51
52
53
# File 'lib/parse/clp_scope.rb', line 51

def reason
  @reason
end

#role_claimsObject

Returns the value of attribute role_claims

Returns:

  • (Object)

    the current value of role_claims



51
52
53
# File 'lib/parse/clp_scope.rb', line 51

def role_claims
  @role_claims
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



51
52
53
# File 'lib/parse/clp_scope.rb', line 51

def status
  @status
end

#viaObject

Returns the value of attribute via

Returns:

  • (Object)

    the current value of via



51
52
53
# File 'lib/parse/clp_scope.rb', line 51

def via
  @via
end

Instance Method Details

#allowed?Boolean

Returns:

  • (Boolean)


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

def allowed?
  status == :allowed
end

#denied?Boolean

Returns:

  • (Boolean)


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

def denied?
  status == :denied
end

#row_check_required?Boolean

Returns:

  • (Boolean)


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

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

#unknown?Boolean

Returns:

  • (Boolean)


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

def unknown?
  status == :unknown
end