mirror of
1
Fork 0

[GITEA] add option for banning dots in usernames (squash) set in test

(cherry picked from commit b005b586c3)
(cherry picked from commit 0077b2661e)
(cherry picked from commit c4589d1fce)
(cherry picked from commit a7f9ff982c)
This commit is contained in:
Earl Warren 2024-01-08 17:53:02 +01:00
parent e019eb33a2
commit 2e172b3c9c
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 5 additions and 0 deletions

View File

@ -505,6 +505,11 @@ func Test_ValidateUser(t *testing.T) {
}
func Test_NormalizeUserFromEmail(t *testing.T) {
oldSetting := setting.Service.AllowDotsInUsernames
defer func() {
setting.Service.AllowDotsInUsernames = oldSetting
}()
setting.Service.AllowDotsInUsernames = true
testCases := []struct {
Input string
Expected string