(_ context.Context, rc requestContext)
| 73 | } |
| 74 | |
| 75 | func 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 | |
| 89 | func anyAuthenticatedUser(_ context.Context, _ requestContext) bool { |
| 90 | return true |
nothing calls this directly
no test coverage detected
searching dependent graphs…