diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-03-31 09:04:15 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-07-06 02:13:50 +0300 |
commit | 11b5932d1f41d6b9f46331ef97d427948ed00712 (patch) | |
tree | c66ab4e0d11a45556639f6cf0a05983e142017cc | |
parent | 6809da705f3a93de6c221909991ce6d1eaf6d4dc (diff) |
Serve custom 404.html file for namespace domains
This will allow namespace domains to serve custom 404.html files
for public projects. This change adds a check to check for permision
only if it's serving a namespace domain with access controls enabled.
-rw-r--r-- | acceptance_test.go | 2 | ||||
-rw-r--r-- | shared/pages/group.auth/group.auth.gitlab-example.com/config.json | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/acceptance_test.go b/acceptance_test.go index e8f7fe1a..67558964 100644 --- a/acceptance_test.go +++ b/acceptance_test.go @@ -1214,7 +1214,7 @@ func TestAccessControlGroupDomain404RedirectsAuth(t *testing.T) { teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "") defer teardown() - rsp, err := GetRedirectPage(t, httpListener, "group.gitlab-example.com", "/nonexistent/") + rsp, err := GetRedirectPage(t, httpListener, "group.auth.gitlab-example.com", "/nonexistent/") require.NoError(t, err) defer rsp.Body.Close() require.Equal(t, http.StatusFound, rsp.StatusCode) diff --git a/shared/pages/group.auth/group.auth.gitlab-example.com/config.json b/shared/pages/group.auth/group.auth.gitlab-example.com/config.json new file mode 100644 index 00000000..292ba673 --- /dev/null +++ b/shared/pages/group.auth/group.auth.gitlab-example.com/config.json @@ -0,0 +1 @@ +{ "domains": [], "id": 1000, "access_control": true } |