From 1f2c2d440c3135225ff4009c0aca2d51852839ea Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 18 Nov 2019 19:12:02 +0100 Subject: [PATCH 1/2] fix: add search to reserved usernames --- integrations/user_test.go | 1 + models/user.go | 1 + 2 files changed, 2 insertions(+) diff --git a/integrations/user_test.go b/integrations/user_test.go index 0a6fdd19d5a0..050cc89b2d0a 100644 --- a/integrations/user_test.go +++ b/integrations/user_test.go @@ -90,6 +90,7 @@ func TestRenameReservedUsername(t *testing.T) { "repo", "template", "user", + "search" } session := loginUser(t, "user2") diff --git a/models/user.go b/models/user.go index ce78e5bfcee9..2cef2e5deccc 100644 --- a/models/user.go +++ b/models/user.go @@ -822,6 +822,7 @@ var ( ".", "..", ".well-known", + "search", } reservedUserPatterns = []string{"*.keys", "*.gpg"} ) From 061f5d24679890b7f7d71b12e42f1a5005ea44c2 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 18 Nov 2019 19:17:21 +0100 Subject: [PATCH 2/2] Update integrations/user_test.go Co-Authored-By: 6543 <24977596+6543@users.noreply.github.com> --- integrations/user_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/user_test.go b/integrations/user_test.go index 050cc89b2d0a..452ea2ddf0d9 100644 --- a/integrations/user_test.go +++ b/integrations/user_test.go @@ -90,7 +90,7 @@ func TestRenameReservedUsername(t *testing.T) { "repo", "template", "user", - "search" + "search", } session := loginUser(t, "user2")