From 33e22fb766b7a123740899bd279206b6cb1115c9 Mon Sep 17 00:00:00 2001 From: Flare Date: Tue, 4 Oct 2016 15:25:58 +0800 Subject: [PATCH] Rename variables Seriously @Unknwon, how did you derp so hard? --- models/user.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/user.go b/models/user.go index 06bce238e..5db2c4472 100644 --- a/models/user.go +++ b/models/user.go @@ -488,8 +488,8 @@ func NewGhostUser() *User { } var ( - reversedUsernames = []string{"assets", "css", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."} - reversedUserPatterns = []string{"*.keys"} + reservedUsernames = []string{"assets", "css", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."} + reservedUserPatterns = []string{"*.keys"} ) // isUsableName checks if name is reserved or pattern of name is not allowed @@ -518,7 +518,7 @@ func isUsableName(names, patterns []string, name string) error { } func IsUsableUsername(name string) error { - return isUsableName(reversedUsernames, reversedUserPatterns, name) + return isUsableName(reservedUsernames, reservedUserPatterns, name) } // CreateUser creates record of a new user.