Skip to content

Commit

Permalink
Allow dash in account name
Browse files Browse the repository at this point in the history
Update changelog
  • Loading branch information
louisruch committed Dec 1, 2020
1 parent af2d9df commit 1920d77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ Canonical reference for changes, improvements, and bugfixes for Boundary.

## vNext

### New and Improved

* controller: Relax account login name constraints to allow dash as valid character
([Issue](https://github.com/hashicorp/boundary/issues/759))
([PR](https://github.com/hashicorp/boundary/pull/806))

### Bug Fixes

* cli: Ensure errors print to stderr when token is not found
([Issue](https://github.com/hashicorp/boundary/issues/791))
([PR](https://github.com/hashicorp/boundary/pull/799)]
([PR](https://github.com/hashicorp/boundary/pull/799))

## v0.1.2

Expand Down
2 changes: 1 addition & 1 deletion internal/auth/password/repository_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (r *Repository) DeleteAccount(ctx context.Context, scopeId, withPublicId st
return rowsDeleted, nil
}

var reInvalidLoginName = regexp.MustCompile("[^a-z0-9.]")
var reInvalidLoginName = regexp.MustCompile("[^a-z0-9.-]")

func validLoginName(u string) bool {
if u == "" {
Expand Down
2 changes: 2 additions & 0 deletions internal/auth/password/repository_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func TestCheckLoginName(t *testing.T) {
{"contains spaces", false},
{"NotLowerCase", false},
{"valid.loginname", true},
{"valid-loginname", true},
{"validloginname", true},
}
for _, tt := range tests {
tt := tt
Expand Down

0 comments on commit 1920d77

Please sign in to comment.