MCPcopy Index your code
hub / github.com/coder/coder / RegoValueOk

Method RegoValueOk

coderd/rbac/authz.go:125–129  ·  view source on GitHub ↗

RegoValueOk is only used for unit testing. There is no easy way to get the error for the unexported method, and this is intentional. Failed rego values can default to the backup json marshal method, so errors are not fatal. Unit tests should be aware when the custom rego marshaller fails.

()

Source from the content-addressed store, hash-verified

123// so errors are not fatal. Unit tests should be aware when the custom
124// rego marshaller fails.
125func (s Subject) RegoValueOk() error {
126 tmp := s
127 _, err := tmp.regoValue()
128 return err
129}
130
131// WithCachedASTValue can be called if the subject is static. This will compute
132// the ast value once and cache it for future calls.

Callers 1

TestAPIKeyFunction · 0.80

Calls 1

regoValueMethod · 0.65

Tested by 1

TestAPIKeyFunction · 0.64