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

Function intersectID

coderd/rbac/allowlist.go:292–304  ·  view source on GitHub ↗
(scopeID, dbID string)

Source from the content-addressed store, hash-verified

290}
291
292func intersectID(scopeID, dbID string) string {
293 switch {
294 case scopeID == dbID:
295 return scopeID
296 case scopeID == policy.WildcardSymbol:
297 return dbID
298 case dbID == policy.WildcardSymbol:
299 return scopeID
300 default:
301 // Should not happen when intersecting with matching IDs; fallback to scope ID.
302 return scopeID
303 }
304}

Callers 1

intersectAllowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected