MCPcopy Create free account
hub / github.com/kopia/kopia / requireServerControlUser

Function requireServerControlUser

internal/server/server_authz_checks.go:75–87  ·  view source on GitHub ↗
(_ context.Context, rc requestContext)

Source from the content-addressed store, hash-verified

73}
74
75func requireServerControlUser(_ context.Context, rc requestContext) bool {
76 if rc.srv.getAuthenticator() == nil {
77 return true
78 }
79
80 if rc.srv.getOptions().ServerControlUser == "" {
81 return false
82 }
83
84 user, _, _ := rc.req.BasicAuth()
85
86 return user == rc.srv.getOptions().ServerControlUser
87}
88
89func anyAuthenticatedUser(_ context.Context, _ requestContext) bool {
90 return true

Callers

nothing calls this directly

Calls 2

getAuthenticatorMethod · 0.65
getOptionsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…