mirror of
https://github.com/distribution/distribution.git
synced 2025-09-20 10:47:26 +00:00
registry/auth: pass request to AccessController
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/distribution/distribution/v3/internal/dcontext"
|
||||
"github.com/distribution/distribution/v3/registry/auth"
|
||||
)
|
||||
|
||||
@@ -16,8 +15,7 @@ func TestSillyAccessController(t *testing.T) {
|
||||
}
|
||||
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := dcontext.WithRequest(dcontext.Background(), r)
|
||||
authCtx, err := ac.Authorized(ctx)
|
||||
authCtx, err := ac.Authorized(r)
|
||||
if err != nil {
|
||||
switch err := err.(type) {
|
||||
case auth.Challenge:
|
||||
|
Reference in New Issue
Block a user