Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
accountserver
Commits
c97fb450
Commit
c97fb450
authored
Jun 29, 2019
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not set acceptMail on websites
parent
9fb4ff47
Pipeline
#3642
passed with stages
in 5 minutes and 5 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
backend/ldap/resources.go
backend/ldap/resources.go
+1
-2
backend/ldap/resources_test.go
backend/ldap/resources_test.go
+0
-1
types.go
types.go
+1
-2
No files found.
backend/ldap/resources.go
View file @
c97fb450
...
...
@@ -253,7 +253,7 @@ func (h *websiteResourceHandler) FromLDAP(entry *ldap.Entry) (*as.Resource, erro
ParentDomain
:
parentSite
,
Options
:
entry
.
GetAttributeValues
(
"option"
),
DocumentRoot
:
entry
.
GetAttributeValue
(
"documentRoot"
),
AcceptMail
:
s2b
(
entry
.
GetAttributeValue
(
"acceptMail"
))
,
AcceptMail
:
false
,
},
},
nil
}
...
...
@@ -266,7 +266,6 @@ func (h *websiteResourceHandler) ToLDAP(rsrc *as.Resource) []ldap.PartialAttribu
{
Type
:
"parentSite"
,
Vals
:
s2l
(
rsrc
.
Website
.
ParentDomain
)},
{
Type
:
"option"
,
Vals
:
rsrc
.
Website
.
Options
},
{
Type
:
"documentRoot"
,
Vals
:
s2l
(
rsrc
.
Website
.
DocumentRoot
)},
{
Type
:
"acceptMail"
,
Vals
:
s2l
(
b2s
(
rsrc
.
Website
.
AcceptMail
))},
{
Type
:
uidNumberLDAPAttr
,
Vals
:
s2l
(
strconv
.
Itoa
(
rsrc
.
Website
.
UID
))},
}
}
...
...
backend/ldap/resources_test.go
View file @
c97fb450
...
...
@@ -84,7 +84,6 @@ func TestResource_LDAPSerialization(t *testing.T) {
URL
:
"https://www.investici.org/site/"
,
UID
:
123456
,
ParentDomain
:
"investici.org"
,
AcceptMail
:
true
,
Options
:
[]
string
{
"php"
,
"sendmail"
},
DocumentRoot
:
"/home/web/root"
,
},
...
...
types.go
View file @
c97fb450
...
...
@@ -454,8 +454,7 @@ type Resource struct {
// IDs).
ID
ResourceID
`json:"id"`
// Resource type. This simply repeats the value of ID.Type but
// is useful when exporting to JSON.
// Resource type.
Type
string
`json:"type"`
// Name of the resource, used for display purposes.
...
...
Write
Preview
Markdown
is supported
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