0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 05:22:50 +01:00

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"
This commit is contained in:
Sandro Santilli 2019-09-24 19:12:56 +02:00 committed by techknowlogick
parent 43c0249583
commit 3dd1cee331
2 changed files with 15 additions and 1 deletions

View file

@ -74,9 +74,22 @@ func TestRenameReservedUsername(t *testing.T) {
prepareTestEnv(t)
reservedUsernames := []string{
"admin",
"api",
"attachments",
"avatars",
"explore",
"help",
"user",
"install",
"issues",
"login",
"metrics",
"notifications",
"org",
"pulls",
"repo",
"template",
"user",
}
session := loginUser(t, "user2")

View file

@ -776,6 +776,7 @@ func NewGhostUser() *User {
var (
reservedUsernames = []string{
"attachments",
"admin",
"api",
"assets",