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

Function IsExternalScope

coderd/rbac/scopes_catalog.go:91–105  ·  view source on GitHub ↗

IsExternalScope returns true if the scope is public, including the `all` and `application_connect` special scopes and the curated low-level resource:action scopes.

(name ScopeName)

Source from the content-addressed store, hash-verified

89// `all` and `application_connect` special scopes and the curated
90// low-level resource:action scopes.
91func IsExternalScope(name ScopeName) bool {
92 switch name {
93 // Include `all` and `application_connect` for backward compatibility.
94 case "all", ScopeAll, "application_connect", ScopeApplicationConnect:
95 return true
96 }
97 if _, ok := externalLowLevel[name]; ok {
98 return true
99 }
100 if _, ok := externalComposite[name]; ok {
101 return true
102 }
103
104 return false
105}
106
107// ExternalScopeNames returns a sorted list of all public scopes, which
108// includes the `all` and `application_connect` special scopes, curated

Callers 2

postTokenMethod · 0.92
TestIsExternalScopeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsExternalScopeFunction · 0.68