Test more reserved usernames (#8263)
* Test more reserved usernames * Add more reserved usernames, sort them * Reserve "attachments" username (is a used route) * It's "avatars" being reserved, not "avatar"release/v1.15
parent
43c0249583
commit
3dd1cee331
|
@ -74,9 +74,22 @@ func TestRenameReservedUsername(t *testing.T) {
|
||||||
prepareTestEnv(t)
|
prepareTestEnv(t)
|
||||||
|
|
||||||
reservedUsernames := []string{
|
reservedUsernames := []string{
|
||||||
|
"admin",
|
||||||
|
"api",
|
||||||
|
"attachments",
|
||||||
|
"avatars",
|
||||||
|
"explore",
|
||||||
"help",
|
"help",
|
||||||
"user",
|
"install",
|
||||||
|
"issues",
|
||||||
|
"login",
|
||||||
|
"metrics",
|
||||||
|
"notifications",
|
||||||
|
"org",
|
||||||
|
"pulls",
|
||||||
|
"repo",
|
||||||
"template",
|
"template",
|
||||||
|
"user",
|
||||||
}
|
}
|
||||||
|
|
||||||
session := loginUser(t, "user2")
|
session := loginUser(t, "user2")
|
||||||
|
|
|
@ -776,6 +776,7 @@ func NewGhostUser() *User {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reservedUsernames = []string{
|
reservedUsernames = []string{
|
||||||
|
"attachments",
|
||||||
"admin",
|
"admin",
|
||||||
"api",
|
"api",
|
||||||
"assets",
|
"assets",
|
||||||
|
|
Loading…
Reference in New Issue