Commit b3e84191 authored by ale's avatar ale
Browse files

Fix bad spelling of mailAlternateAddress

parent a9615dd8
...@@ -164,7 +164,7 @@ func (h *emailResourceHandler) FromLDAP(entry *ldap.Entry) (*as.Resource, error) ...@@ -164,7 +164,7 @@ func (h *emailResourceHandler) FromLDAP(entry *ldap.Entry) (*as.Resource, error)
Type: as.ResourceTypeEmail, Type: as.ResourceTypeEmail,
Name: email, Name: email,
Email: &as.Email{ Email: &as.Email{
Aliases: entry.GetAttributeValues("mailAlternateAddr"), Aliases: entry.GetAttributeValues("mailAlternateAddress"),
Maildir: entry.GetAttributeValue("mailMessageStore"), Maildir: entry.GetAttributeValue("mailMessageStore"),
}, },
}, nil }, nil
...@@ -174,7 +174,7 @@ func (h *emailResourceHandler) ToLDAP(rsrc *as.Resource) []ldap.PartialAttribute ...@@ -174,7 +174,7 @@ func (h *emailResourceHandler) ToLDAP(rsrc *as.Resource) []ldap.PartialAttribute
return []ldap.PartialAttribute{ return []ldap.PartialAttribute{
{Type: "objectClass", Vals: []string{"top", "virtualMailUser"}}, {Type: "objectClass", Vals: []string{"top", "virtualMailUser"}},
{Type: "mail", Vals: s2l(rsrc.ID.Name())}, {Type: "mail", Vals: s2l(rsrc.ID.Name())},
{Type: "mailAlternateAddr", Vals: rsrc.Email.Aliases}, {Type: "mailAlternateAddress", Vals: rsrc.Email.Aliases},
{Type: "mailMessageStore", Vals: s2l(rsrc.Email.Maildir)}, {Type: "mailMessageStore", Vals: s2l(rsrc.Email.Maildir)},
} }
} }
......
...@@ -13,13 +13,13 @@ func TestEmailResource_FromLDAP(t *testing.T) { ...@@ -13,13 +13,13 @@ func TestEmailResource_FromLDAP(t *testing.T) {
entry := ldap.NewEntry( entry := ldap.NewEntry(
"mail=test@investici.org,uid=test@investici.org,ou=People,dc=example,dc=com", "mail=test@investici.org,uid=test@investici.org,ou=People,dc=example,dc=com",
map[string][]string{ map[string][]string{
"objectClass": []string{"top", "virtualMailUser"}, "objectClass": []string{"top", "virtualMailUser"},
"mail": []string{"test@investici.org"}, "mail": []string{"test@investici.org"},
"status": []string{"active"}, "status": []string{"active"},
"host": []string{"host1"}, "host": []string{"host1"},
"originalHost": []string{"host1"}, "originalHost": []string{"host1"},
"mailAlternateAddr": []string{"test2@investici.org", "test3@investici.org"}, "mailAlternateAddress": []string{"test2@investici.org", "test3@investici.org"},
"mailMessageStore": []string{"test/store"}, "mailMessageStore": []string{"test/store"},
}, },
) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment