Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
accountserver
Commits
b3e84191
Commit
b3e84191
authored
Nov 12, 2018
by
ale
Browse files
Fix bad spelling of mailAlternateAddress
parent
a9615dd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/resources.go
View file @
b3e84191
...
@@ -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
(
"mailAlternateAddr
ess
"
),
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
:
"mailAlternateAddr
ess
"
,
Vals
:
rsrc
.
Email
.
Aliases
},
{
Type
:
"mailMessageStore"
,
Vals
:
s2l
(
rsrc
.
Email
.
Maildir
)},
{
Type
:
"mailMessageStore"
,
Vals
:
s2l
(
rsrc
.
Email
.
Maildir
)},
}
}
}
}
...
...
backend/resources_test.go
View file @
b3e84191
...
@@ -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"
},
"mailAlternateAddr
ess
"
:
[]
string
{
"test2@investici.org"
,
"test3@investici.org"
},
"mailMessageStore"
:
[]
string
{
"test/store"
},
"mailMessageStore"
:
[]
string
{
"test/store"
},
},
},
)
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment