mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
enable dot(.) in usernames
This commit is contained in:
parent
8125f97c21
commit
3529dda2ba
2 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
)
|
||||
|
||||
// validate a username (e.g. from github)
|
||||
var reUsername = regexp.MustCompile("^[a-zA-Z0-9-_]+$")
|
||||
var reUsername = regexp.MustCompile("^[a-zA-Z0-9-_.]+$")
|
||||
|
||||
var errUserLoginInvalid = errors.New("Invalid User Login")
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@ func TestUserValidate(t *testing.T) {
|
|||
user: User{Login: "john_smith"},
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
user: User{Login: "john.smith"},
|
||||
err: nil,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
Loading…
Reference in a new issue