Commit c97fb450 authored by ale's avatar ale

Do not set acceptMail on websites

parent 9fb4ff47
Pipeline #3642 passed with stages
in 5 minutes and 5 seconds
......@@ -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))},
}
}
......
......@@ -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",
},
......
......@@ -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.
......
Markdown is supported
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