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

Function AIBridgeInterceptionConverter

coderd/rbac/regosql/configs.go:113–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113func AIBridgeInterceptionConverter() *sqltypes.VariableConverter {
114 matcher := sqltypes.NewVariableConverter().RegisterMatcher(
115 resourceIDMatcher(),
116 // AI Bridge interceptions are not tied to any organization.
117 sqltypes.StringVarMatcher("''", []string{"input", "object", "org_owner"}),
118 sqltypes.StringVarMatcher("initiator_id :: text", []string{"input", "object", "owner"}),
119 )
120 matcher.RegisterMatcher(
121 // No ACLs on the aibridge interception type
122 sqltypes.AlwaysFalse(groupACLMatcher(matcher)),
123 sqltypes.AlwaysFalse(userACLMatcher(matcher)),
124 )
125 return matcher
126}
127
128func UserConverter() *sqltypes.VariableConverter {
129 matcher := sqltypes.NewVariableConverter().RegisterMatcher(

Calls 7

NewVariableConverterFunction · 0.92
StringVarMatcherFunction · 0.92
AlwaysFalseFunction · 0.92
resourceIDMatcherFunction · 0.85
groupACLMatcherFunction · 0.85
userACLMatcherFunction · 0.85
RegisterMatcherMethod · 0.80

Tested by

no test coverage detected