diff options
Diffstat (limited to 'hotline/account.go')
| -rw-r--r-- | hotline/account.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hotline/account.go b/hotline/account.go index 2c400ac..a680861 100644 --- a/hotline/account.go +++ b/hotline/account.go @@ -8,10 +8,10 @@ import ( const GuestAccount = "guest" // default account used when no login is provided for a connection type Account struct { - Login string `yaml:"Login"` - Name string `yaml:"Name"` - Password string `yaml:"Password"` - Access *[]byte `yaml:"Access"` // 8 byte bitmap + Login string `yaml:"Login"` + Name string `yaml:"Name"` + Password string `yaml:"Password"` + Access accessBitmap `yaml:"Access"` } // Read implements io.Reader interface for Account @@ -19,7 +19,7 @@ func (a *Account) Read(p []byte) (n int, err error) { fields := []Field{ NewField(fieldUserName, []byte(a.Name)), NewField(fieldUserLogin, negateString([]byte(a.Login))), - NewField(fieldUserAccess, *a.Access), + NewField(fieldUserAccess, a.Access[:]), } if bcrypt.CompareHashAndPassword([]byte(a.Password), []byte("")) != nil { |