fix: Redirect to login when unauthenticated and requesting a workspace app (#2903)

Fixes #2884.
This commit is contained in:
Kyle Carberry
2022-07-11 13:46:01 -05:00
committed by GitHub
parent 08d90f7b4f
commit 2c89e07e12
12 changed files with 94 additions and 46 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ func TestExtractUserRoles(t *testing.T) {
rtr = chi.NewRouter()
)
rtr.Use(
httpmw.ExtractAPIKey(db, &httpmw.OAuth2Configs{}),
httpmw.ExtractAPIKey(db, &httpmw.OAuth2Configs{}, false),
)
rtr.Get("/", func(_ http.ResponseWriter, r *http.Request) {
roles := httpmw.AuthorizationUserRoles(r)