X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/926c7f5505456a0900e9c49f6c08efebe9a53505..854a92fc2755ace61c405df335ddf69b02a3d932:/hotline/account.go 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 {