Allow "-" in usernames

now that username and mailboxes are totally separate, we can allow '-'.
'+' is still reserved because LDAP it.

Fixes #509
This commit is contained in:
Girish Ramakrishnan
2018-05-05 09:55:46 -07:00
parent da5fd71aaa
commit 0c07c6e4d0
2 changed files with 3 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ describe('User', function () {
});
it('fails due to invalid username', function (done) {
users.create('moo-daemon', PASSWORD, EMAIL, DISPLAY_NAME, AUDIT_SOURCE, function (error, result) {
users.create('moo+daemon', PASSWORD, EMAIL, DISPLAY_NAME, AUDIT_SOURCE, function (error, result) {
expect(error).to.be.ok();
expect(result).to.not.be.ok();
expect(error.reason).to.equal(UsersError.BAD_FIELD);