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

Function WorkspaceConverter

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

Source from the content-addressed store, hash-verified

41}
42
43func WorkspaceConverter() *sqltypes.VariableConverter {
44 matcher := sqltypes.NewVariableConverter().RegisterMatcher(
45 resourceIDMatcher(),
46 sqltypes.StringVarMatcher("workspaces.organization_id :: text", []string{"input", "object", "org_owner"}),
47 userOwnerMatcher(),
48 )
49 matcher.RegisterMatcher(
50 ACLMappingMatcher(matcher, "workspaces.group_acl", []string{"input", "object", "acl_group_list"}).UsingSubfield("permissions"),
51 ACLMappingMatcher(matcher, "workspaces.user_acl", []string{"input", "object", "acl_user_list"}).UsingSubfield("permissions"),
52 )
53
54 return matcher
55}
56
57func ChatConverter() *sqltypes.VariableConverter {
58 matcher := chatBaseConverter()

Callers 2

ConfigWorkspacesFunction · 0.92
TestRegoQueriesFunction · 0.92

Calls 7

NewVariableConverterFunction · 0.92
StringVarMatcherFunction · 0.92
resourceIDMatcherFunction · 0.85
userOwnerMatcherFunction · 0.85
ACLMappingMatcherFunction · 0.85
RegisterMatcherMethod · 0.80
UsingSubfieldMethod · 0.80

Tested by 1

TestRegoQueriesFunction · 0.74