From f37d98000ba4e11e90088b51dcdcfcaafcfe7518 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 1 Jun 2022 13:33:35 +0200 Subject: [PATCH] console: use __default as the default user to avoid clash with real ones --- console/authentication/config.go | 2 +- console/authentication/handlers_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/console/authentication/config.go b/console/authentication/config.go index 67729355..4da4f47b 100644 --- a/console/authentication/config.go +++ b/console/authentication/config.go @@ -28,7 +28,7 @@ func DefaultConfiguration() Configuration { LogoutURL: "X-Logout-URL", }, DefaultUser: UserInformation{ - Login: "default", + Login: "__default", Name: "Default User", }, } diff --git a/console/authentication/handlers_test.go b/console/authentication/handlers_test.go index ff8625f0..3a61953e 100644 --- a/console/authentication/handlers_test.go +++ b/console/authentication/handlers_test.go @@ -30,7 +30,7 @@ func TestUserHandler(t *testing.T) { Description: "user info, no user logged in", URL: "/api/v0/console/user/info", StatusCode: 200, - JSONOutput: gin.H{"login": "default", "name": "Default User"}, + JSONOutput: gin.H{"login": "__default", "name": "Default User"}, }, { Description: "user info, minimal user logged in", URL: "/api/v0/console/user/info", @@ -71,7 +71,7 @@ func TestUserHandler(t *testing.T) { return headers }(), StatusCode: 200, - JSONOutput: gin.H{"login": "default", "name": "Default User"}, + JSONOutput: gin.H{"login": "__default", "name": "Default User"}, }, { Description: "avatar, no user logged in", URL: "/api/v0/console/user/avatar",