MCPcopy Create free account
hub / github.com/cloudbase/garm / SetAdmin

Function SetAdmin

auth/context.go:283–285  ·  view source on GitHub ↗

SetAdmin sets the isAdmin flag on the context

(ctx context.Context, isAdmin bool)

Source from the content-addressed store, hash-verified

281
282// SetAdmin sets the isAdmin flag on the context
283func SetAdmin(ctx context.Context, isAdmin bool) context.Context {
284 return context.WithValue(ctx, isAdminKey, isAdmin)
285}
286
287// IsAdmin returns a boolean indicating whether
288// or not the context belongs to a logged in user

Callers 2

PopulateContextFunction · 0.85
GetAdminContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected