diff --git a/src/modules/acl/acl.go b/src/modules/acl/acl.go index 66d64be..b155f40 100644 --- a/src/modules/acl/acl.go +++ b/src/modules/acl/acl.go @@ -417,21 +417,3 @@ func (acl *ACL) AuthorizeConnection(conn *net.Conn, cmd []string, command utils. return nil } - -func CreateUser(username string) *User { - return &User{ - Username: username, - Enabled: true, - NoPassword: false, - Passwords: []Password{}, - IncludedCategories: []string{}, - ExcludedCategories: []string{}, - IncludedCommands: []string{}, - ExcludedCommands: []string{}, - IncludedKeys: []string{}, - IncludedReadKeys: []string{}, - IncludedWriteKeys: []string{}, - IncludedPubSubChannels: []string{}, - ExcludedPubSubChannels: []string{}, - } -} diff --git a/src/modules/acl/user.go b/src/modules/acl/user.go index 0ed1151..073a8ef 100644 --- a/src/modules/acl/user.go +++ b/src/modules/acl/user.go @@ -261,6 +261,24 @@ func (user *User) Replace(new *User) { user.ExcludedPubSubChannels = new.ExcludedPubSubChannels } +func CreateUser(username string) *User { + return &User{ + Username: username, + Enabled: true, + NoPassword: false, + Passwords: []Password{}, + IncludedCategories: []string{}, + ExcludedCategories: []string{}, + IncludedCommands: []string{}, + ExcludedCommands: []string{}, + IncludedKeys: []string{}, + IncludedReadKeys: []string{}, + IncludedWriteKeys: []string{}, + IncludedPubSubChannels: []string{}, + ExcludedPubSubChannels: []string{}, + } +} + func GetPasswordType(password string) string { if password[0] == '#' { return "SHA256"