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

Method SafeScopeName

coderd/rbac/authz.go:162–167  ·  view source on GitHub ↗

SafeScopeName prevent nil pointer dereference.

()

Source from the content-addressed store, hash-verified

160
161// SafeScopeName prevent nil pointer dereference.
162func (s Subject) SafeScopeName() string {
163 if s.Scope == nil {
164 return "no-scope"
165 }
166 return s.Scope.Name().String()
167}
168
169// SafeRoleNames prevent nil pointer dereference.
170func (s Subject) SafeRoleNames() []RoleIdentifier {

Callers 6

EqualMethod · 0.95
AuthorizeFilterFunction · 0.80
AuthorizeMethod · 0.80
AuthorizeContextMethod · 0.80
checkAuthorizationMethod · 0.80
rbacTraceAttributesFunction · 0.80

Calls 2

NameMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected