Browse Source

Rename variables

Seriously @Unknwon, how did you derp so hard?
pull/3728/head
Flare 8 years ago
parent
commit
33e22fb766
No known key found for this signature in database
GPG Key ID: 762EE3D369C1A772
  1. 6
      models/user.go

6
models/user.go

@ -488,8 +488,8 @@ func NewGhostUser() *User {
} }
var ( 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", ".", ".."} reservedUsernames = []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"} reservedUserPatterns = []string{"*.keys"}
) )
// isUsableName checks if name is reserved or pattern of name is not allowed // 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 { func IsUsableUsername(name string) error {
return isUsableName(reversedUsernames, reversedUserPatterns, name) return isUsableName(reservedUsernames, reservedUserPatterns, name)
} }
// CreateUser creates record of a new user. // CreateUser creates record of a new user.

Loading…
Cancel
Save