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)
Type: as.ResourceTypeEmail,
Name: email,
Email: &as.Email{
Aliases: entry.GetAttributeValues("mailAlternateAddr"),
Aliases: entry.GetAttributeValues("mailAlternateAddress"),
Maildir: entry.GetAttributeValue("mailMessageStore"),
}, nil
......@@ -174,7 +174,7 @@ func (h *emailResourceHandler) ToLDAP(rsrc *as.Resource) []ldap.PartialAttribute
return []ldap.PartialAttribute{
{Type: "objectClass", Vals: []string{"top", "virtualMailUser"}},
{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)},
......@@ -18,7 +18,7 @@ func TestEmailResource_FromLDAP(t *testing.T) {
"status": []string{"active"},
"host": []string{"host1"},
"originalHost": []string{"host1"},
"mailAlternateAddr": []string{"", ""},
"mailAlternateAddress": []string{"", ""},
"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