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 ...@@ -253,7 +253,7 @@ func (h *websiteResourceHandler) FromLDAP(entry *ldap.Entry) (*as.Resource, erro
ParentDomain: parentSite, ParentDomain: parentSite,
Options: entry.GetAttributeValues("option"), Options: entry.GetAttributeValues("option"),
DocumentRoot: entry.GetAttributeValue("documentRoot"), DocumentRoot: entry.GetAttributeValue("documentRoot"),
AcceptMail: s2b(entry.GetAttributeValue("acceptMail")), AcceptMail: false,
}, },
}, nil }, nil
} }
...@@ -266,7 +266,6 @@ func (h *websiteResourceHandler) ToLDAP(rsrc *as.Resource) []ldap.PartialAttribu ...@@ -266,7 +266,6 @@ func (h *websiteResourceHandler) ToLDAP(rsrc *as.Resource) []ldap.PartialAttribu
{Type: "parentSite", Vals: s2l(rsrc.Website.ParentDomain)}, {Type: "parentSite", Vals: s2l(rsrc.Website.ParentDomain)},
{Type: "option", Vals: rsrc.Website.Options}, {Type: "option", Vals: rsrc.Website.Options},
{Type: "documentRoot", Vals: s2l(rsrc.Website.DocumentRoot)}, {Type: "documentRoot", Vals: s2l(rsrc.Website.DocumentRoot)},
{Type: "acceptMail", Vals: s2l(b2s(rsrc.Website.AcceptMail))},
{Type: uidNumberLDAPAttr, Vals: s2l(strconv.Itoa(rsrc.Website.UID))}, {Type: uidNumberLDAPAttr, Vals: s2l(strconv.Itoa(rsrc.Website.UID))},
} }
} }
......
...@@ -84,7 +84,6 @@ func TestResource_LDAPSerialization(t *testing.T) { ...@@ -84,7 +84,6 @@ func TestResource_LDAPSerialization(t *testing.T) {
URL: "https://www.investici.org/site/", URL: "https://www.investici.org/site/",
UID: 123456, UID: 123456,
ParentDomain: "investici.org", ParentDomain: "investici.org",
AcceptMail: true,
Options: []string{"php", "sendmail"}, Options: []string{"php", "sendmail"},
DocumentRoot: "/home/web/root", DocumentRoot: "/home/web/root",
}, },
......
...@@ -454,8 +454,7 @@ type Resource struct { ...@@ -454,8 +454,7 @@ type Resource struct {
// IDs). // IDs).
ID ResourceID `json:"id"` ID ResourceID `json:"id"`
// Resource type. This simply repeats the value of ID.Type but // Resource type.
// is useful when exporting to JSON.
Type string `json:"type"` Type string `json:"type"`
// Name of the resource, used for display purposes. // 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