From 52c2cb15db77a381880db7e44f133a49b3516dd5 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 13 Aug 2018 13:02:18 +0800 Subject: [PATCH] add vendor to user reserved words and format words list according alphabet (#4685) --- models/user.go | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 32b9bfec9..a68b23568 100644 --- a/models/user.go +++ b/models/user.go @@ -683,7 +683,35 @@ func NewGhostUser() *User { } var ( - reservedUsernames = []string{"assets", "css", "explore", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatars", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "error", "new", ".", ".."} + reservedUsernames = []string{ + "admin", + "api", + "assets", + "avatars", + "commits", + "css", + "debug", + "error", + "explore", + "help", + "img", + "install", + "issues", + "js", + "less", + "new", + "org", + "plugins", + "pulls", + "raw", + "repo", + "stars", + "template", + "user", + "vendor", + ".", + "..", + } reservedUserPatterns = []string{"*.keys"} )