MCPcopy Create free account
hub / github.com/coder/coder / NoACLConverter

Function NoACLConverter

coderd/rbac/regosql/configs.go:147–159  ·  view source on GitHub ↗

NoACLConverter should be used when the target SQL table does not contain group or user ACL columns.

()

Source from the content-addressed store, hash-verified

145// NoACLConverter should be used when the target SQL table does not contain
146// group or user ACL columns.
147func NoACLConverter() *sqltypes.VariableConverter {
148 matcher := sqltypes.NewVariableConverter().RegisterMatcher(
149 resourceIDMatcher(),
150 organizationOwnerMatcher(),
151 userOwnerMatcher(),
152 )
153 matcher.RegisterMatcher(
154 sqltypes.AlwaysFalse(groupACLMatcher(matcher)),
155 sqltypes.AlwaysFalse(userACLMatcher(matcher)),
156 )
157
158 return matcher
159}
160
161func DefaultVariableConverter() *sqltypes.VariableConverter {
162 matcher := sqltypes.NewVariableConverter().RegisterMatcher(

Callers 2

ConfigWithoutACLFunction · 0.92
TestRegoQueriesFunction · 0.92

Calls 8

NewVariableConverterFunction · 0.92
AlwaysFalseFunction · 0.92
resourceIDMatcherFunction · 0.85
organizationOwnerMatcherFunction · 0.85
userOwnerMatcherFunction · 0.85
groupACLMatcherFunction · 0.85
userACLMatcherFunction · 0.85
RegisterMatcherMethod · 0.80

Tested by 1

TestRegoQueriesFunction · 0.74