MCPcopy Create free account
hub / github.com/elimity-com/scim / referenceContains

Method referenceContains

internal/filter/filter.go:299–309  ·  view source on GitHub ↗

referenceContains returns the schema and attribute to which the attribute path applies.

(attrPath filter.AttributePath)

Source from the content-addressed store, hash-verified

297
298// referenceContains returns the schema and attribute to which the attribute path applies.
299func (v Validator) referenceContains(attrPath filter.AttributePath) (schema.Schema, schema.CoreAttribute, bool) {
300 for _, s := range append([]schema.Schema{v.schema}, v.extensions...) {
301 if uri := attrPath.URI(); uri != "" && s.ID != uri {
302 continue
303 }
304 if attr, ok := s.Attributes.ContainsAttribute(attrPath.AttributeName); ok {
305 return s, attr, true
306 }
307 }
308 return schema.Schema{}, schema.CoreAttribute{}, false
309}

Callers 1

PassesFilterMethod · 0.95

Calls 1

ContainsAttributeMethod · 0.80

Tested by

no test coverage detected